Open alanwest opened 4 years ago
https://github.com/open-telemetry/opentelemetry-dotnet/pull/1464 This PR should address this, right ? atleast partially?
open-telemetry/opentelemetry-dotnet#1464 This PR should address this, right ? atleast partially?
Yes, correct parenting will be maintained when using SuppressDownstreamInstrumentation
. I think it's ok to declare this "not a bug" and just document this behavior.
Is this still something we have to do @alanwest ? it's been 3 years and I've not seen any issues with regards to this.
Is this still something we have to do @alanwest ? it's been 3 years and I've not seen any issues with regards to this.
Yes. There is no mention of this in the doc.
Both the gRPC .NET and HttpClient libraries generate their own Activity for outgoing calls.
gRPC .NET uses HttpClient behind the scenes, so when you configure OpenTelemetry with both gRPC and HttpClient instrumentation you'll see that the Activity generated by gRPC is the parent of the Activity generated by HttpClient.
However, if you only include gRPC instrumentation or if you only include HttpClient instrumentation the chain of parenting can become broken since the library still generates their respective Activity. Another way this can occur is if you add both gRPC and HttpClient instrumentation, but you configure
SuppressDownstreamInstrumentation
for the gRPC instrumentation thereby excluding the child HttpClient Activity from the trace.This issue is somewhat related to open-telemetry/opentelemetry-dotnet-contrib#1779 in that the general issue is that libraries generate Activities regardless of whether OpenTelemetry has been configured to be interested in them. I'm not sure there are good answers here, but it would be nice if there were a way to inform a library of whether or not to generate Activities based on how OpenTelemetry is configured for an app.