-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to not include couchbase internal spans #6763
Add option to not include couchbase internal spans #6763
Conversation
c4c6a70
to
e605ec2
Compare
Hi @brentm5 Thanks for you contribution! About the implementation, I understand the main goal is to disable the I would rather use instrumentation alternative names to disable the whole instrumenter. |
👋 @brentm5 the PR looks OK. However the original request span should be wrapped again with particular care otherwise it will be finished prematurely. I'll need to add some tests to cover that feature flag and to bring slight changes. I'll add a commit for it |
This would have been the best option but unfortunately we still need that couchbase tracing callback to enrich parent span so it's not sounding possible to me to go this way. The implementation proposed looks good enough to solve that need |
Thank you! Looking at what traces were generated it does indeed look like something isn't quite right with this. It looks like it currently ends the trace after the first This shows the internal couchbase spans enabled (IE current state). With all the time in the custom parent span This shows the internal couchbase spans disabled. With this the couchbase spans appear to be shorter and mimic the time in the first |
@brentm5 thanks for the detailed throubleshoot. Yes as previously told it was expected since you passed the first request span when the internal span was called hence couchbase was triggering an endspan on the parent when it was related to the child (internal). Could you please try with this version if you can? If now the behaviour is closer to the expected, please feel free to undraft that PR and I'll go on with the internal review. Andrea |
Thank you so much for making this work. I ran this in my test environment and things look correct. I did default this to |
What Does This Do
This adds an option to disable couchbase internal traces from being generated.
Motivation
The couchbase internal spans don't provide much more value over the top level couchbase span. By removing these internal spans we reduce the overall amount of spans significantly and provide and a less complex experience.
The feature is opt-in and can be activated by setting:
DD_TRACE_COUCHBASE_INTERNAL_SPANS_ENABLED=false
-Ddd.trace.couchbase.internal-spans.enabled=false
Additional Notes
First time contributor and not really familiar with gradle as a build tool.