opentelemetry-dotnet: Don't record child activities
I am trying to create an instrumentation for the Elasticsearch.Net client. Internally, it’s using HttpClient. I’d like to only record the Elasticsearch call and the details about it and have it show up as a db.system
of type elasticsearch
. I’ve got that much working, but the problem is that it’s also recording the internal HttpClient call. Is there some way I can cancel recording all child activities after starting the Elasticsearch call activity so that it won’t capture the HttpClient call? I know that I can provide a filter function for the HttpClient instrumentation, but I was really hoping to not have to do that.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 2
- Comments: 18 (17 by maintainers)
Given I have done this several times in different languages, I won’t be afraid to do it again in this repo 😄 If I got enough 👍 I am happy to send a small PR on this:
@rajkumar-rangaraj is working to make this configurage in gRPC client instrumentation. Once done we can review it and make it the recommendation for every instrumentation authors.
I’ve added this to OpenCensus 3 years ago and still having trouble today convincing people it is important 😄
Related, yes. But not exact duplicate. 809 is for users to filter early. This issue if more for InstrumentationLibrary authors.