serilog / serilog-sinks-opentelemetry

A Serilog OpenTelemetry Protocol (OTLP) sink
Apache License 2.0
121 stars 18 forks source link

SpanId and TraceId remains similar #93

Closed Veeraraghavans closed 1 year ago

Veeraraghavans commented 1 year ago

Hi Team,

I am using serilog sink for dotnet 3.1 core application. I am trying to generate log console for capturing trace and span information. I get the traceid not generated based on activity rather I get same value everytime i execute and spanid has | appended with traceid as shown below.

{"Timestamp":"2023-06-20T13:47:27.0775037+00:00","Level":"Information","TraceId":"9c351ca5-4cb764e0336735c8","SpanId":"|9c351ca5-4cb764e0336735c8.","Message":"Request finished in 31.6978ms 200 "}

Please let me know if I am doing things correctly. Happy to provide more information

loomis commented 1 year ago

@Veeraraghavans Can you provide a code snippet with how you've configured the sink and how you are generating your logs? The trace and span IDs you've shown in your example message do not look like the standard values coming from a .NET activity.

Veeraraghavans commented 1 year ago

Thanks @loomis for your comments I fixed it.