List of NuGet packages and
version that you are using (e.g. OpenTelemetry 0.4.0-beta.2):
Runtime version (e.g. net461, net48, netcoreapp2.1, netcoreapp3.1, etc.
You can find this information from the *.csproj file):
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
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:
Add any other context about the problem here.
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