opentelemetry-dotnet-contrib
opentelemetry-dotnet-contrib copied to clipboard
Loki Exporter
I was looking around the Web and then here - is there a "OpenTelemetry.Exporter.Loki" somewhere?
builder.Logging.AddOpenTelemetry(options =>
{
options.AddLokiExporter();
});
Yes, I know I can do this with the collector+exporter, but I am looking for a simple solution on a developers box.
@christophwille At least for Grafana Cloud, you can send data directly via OTLP using the OTLP exporter.
However, for a Loki instance running on-prem, there's currently no solution without running a collector or agent.
My initial idea of "hacking" it was taking https://github.com/serilog-contrib/serilog-sinks-grafana-loki and rewrapping it for OpenTelemetry.
@christophwille, native support for OTLP is planned for next release, as I understand - 2.10.0.
You can check PR introducing this functionality here. Please let me know, if it is sufficient for you. I do not think, that in this case, it is worth to invest in .NET native exporter.
Yes, that definitely would be sufficient. (in the meantime I started using the Aspire dashboard locally)