Opentelemetry-dotnet: Relationship with Prometheus.NET and Serilog

Created on 5 Apr 2021  路  2Comments  路  Source: open-telemetry/opentelemetry-dotnet

Question

What is the relationship between OpenTelemetry and a typical configuration with Prometheus.NET + Prometheus/Grafana for metrics and Serilog + ELK stack for logging, where Serilog is configured to be used with Microsoft.Extensions.Logging?
Should I use one over the other or in some combination?

question

Most helpful comment

I am also looking for answer of above question. I am using Serilog for logging - I enrich all the logs with TraceID and SpanID of Http Request. I am using Prometheus.NET to collect metrics.
How do I leverage OpenTelemetry.NET in this setup?

I also have one more problem-
I receive messages from Third Party MF system to my kafka queue. Each message has its own unique id. There is .Net core kafka message processor which reads message from Queue and call a multiple Web Apis.
How do I assign unique Id of message to System.Diagnostics.Activity.TraceID in Kafak .Net processor, so any HttpClient call made from this exe to any API get that copied over via request headers.

Alternatively please also let me know if I am approaching the problem in wrong way and there is already a standard solution for this kind of problem.

All 2 comments

I am also looking for answer of above question. I am using Serilog for logging - I enrich all the logs with TraceID and SpanID of Http Request. I am using Prometheus.NET to collect metrics.
How do I leverage OpenTelemetry.NET in this setup?

I also have one more problem-
I receive messages from Third Party MF system to my kafka queue. Each message has its own unique id. There is .Net core kafka message processor which reads message from Queue and call a multiple Web Apis.
How do I assign unique Id of message to System.Diagnostics.Activity.TraceID in Kafak .Net processor, so any HttpClient call made from this exe to any API get that copied over via request headers.

Alternatively please also let me know if I am approaching the problem in wrong way and there is already a standard solution for this kind of problem.

I'm interested in the related question of how i can use opentelemetry.net with Loki for logs

Was this page helpful?
0 / 5 - 0 ratings