DataDog / serilog-sinks-datadog-logs

Serilog Sink that sends log events to Datadog https://www.datadoghq.com/
Apache License 2.0
60 stars 42 forks source link

Sink not sending trace_id or span_id with log messages #63

Closed ArtDubya closed 3 years ago

ArtDubya commented 3 years ago

Trying to associate log messages with APM tracing.

Example message from log file written locally

{ "Timestamp": "2021-05-14T00:52:05.4594500+00:00", "Level": "Error", "MessageTemplate": "Redis connection error restored.", "Properties": { "SourceContext": "StackExchange.Redis.Extensions.Core.Implementations.RedisCacheConnectionPoolManager", "ActionId": "270d82cd-5e77-4297-b14c-85d9a3687848", "ActionName": "AppName.GetFeed", "RequestId": "0HM8ME9U2MBJC:00000001", "RequestPath": "/api/feed/", "SpanId": "|324a271c-4f868acc15ad5004.", "TraceId": "324a271c-4f868acc15ad5004", "ParentId": "", "ConnectionId": "0HM8ME9U2MBJC", "dd_service": "app_name", "dd_version": "302641470", "dd_env": "Stage", "dd_trace_id": "2616484425193070131", "dd_span_id": "3407413556633065975" } }

Any way to forward the Span and Trace IDs with the message?

ArtDubya commented 3 years ago

Not an issue

pawan-regoti commented 3 years ago

@ArtDubya how did you fix this issue?