Opentelemetry-dotnet: Traces are rejected by SignalFx because Root Span contains ParentSpanId=00000000

Created on 18 Sep 2020  路  4Comments  路  Source: open-telemetry/opentelemetry-dotnet

Bug Report

List of NuGet packages and
version that you are using (e.g. OpenTelemetry 0.4.0-beta.2):

  • OpenTelemetry -Version 0.6.0-beta.7

Runtime version (e.g. net461, net48, netcoreapp2.1, netcoreapp3.1, etc.
You can find this information from the *.csproj file):

  • netcoreapp3.1

Symptom

We were trying to export traces to SignalFx but they were rejected because the root span contained a property ParentSpanId equal to' 00000000' instead of 'null'.

We noticed this test was commented out which would identify the issue.
https://github.com/open-telemetry/opentelemetry-dotnet/blob/master/test/OpenTelemetry.Tests/Trace/TracerProviderSdkTest.cs#L47

This is the Span definition in the proto files https://github.com/open-telemetry/opentelemetry-proto/blob/master/opentelemetry/proto/trace/v1/trace.proto#L82

Reproduce

I used the example code from here and added the otlpExporter: https://github.com/open-telemetry/opentelemetry-dotnet/blob/master/examples/Console/TestConsoleExporter.cs#L43-L47

We will close this issue if:

  • The repro project you share with us is complex. We can't investigate custom
    projects, so don't point us to such, please.
  • If we can not reproduce the behavior you're reporting.

Additional Context

Add any other context about the problem here.

bug

All 4 comments

Opened an issue in runtime:
https://github.com/dotnet/runtime/issues/42456

(We may be able to workaround it in OpenTelemetry, but will wait to confirm if this is indeed a bug)

@ddiaz-relativity Were you using Otlp exporter? If yes, #1295 should fix this issue for you.
If you were writing own exporter, then do the similar workaround as 1295.

Let us know once you try this.

Comparing the output traces from the otel-dotnet library to the otel-Java library (As seen here https://github.com/Omnition/synthetic-load-generator) we see that the java-based Root spans have no parentSpanId.

So it seems signalfx would need to update their check on their side to something like this
if (activity.ParentSpanId.ToHexString() != EmptyActivitySpanId)

Or we can wait till https://github.com/dotnet/runtime/issues/42456 is fixed

@ddiaz-relativity Its fixed already. You can use our daily build from myget which would contain the fix

Was this page helpful?
0 / 5 - 0 ratings