Open Hawxy opened 1 month ago
Thanks @Hawxy, I was able to replicate this and will work on getting a better fix implemented for the Tracer.
There does seem to be a potential workaround though by setting the environment variable OTEL_SERVICE_NAME
to the same value as DD_SERVICE
.
Note that we are currently working on supporting remapping OpenTelemetry environment variables to their Datadog equivalent ones: https://github.com/DataDog/dd-trace-dotnet/pull/5661 I don't think this would have an impact here though, but just wanted to raise it.
But I'll work on getting a fix to address it without needing to do that
Describe the bug We use the Hangfire OTEL instrumentation (located here) to add root spans to the running jobs.
OTEL is configured like so to add the .NET Activity instrumentation but the export is delegated to DD Trace's automated OTEL support:
However this results in the hangfire root spans showing up under their own service "unknown_service:dotnet" in the DD console. All other spans from the service are correctly aggregated.
The span metadata does have the correct service name:
This application is running in App Services with the tracer baked into the image:
Runtime environment: