Suppress botocore downstream instrumentation like urllib3#563
Merged
codeboten merged 9 commits intoopen-telemetry:mainfrom Jul 14, 2021
Merged
Conversation
Contributor
|
Does |
Contributor
Author
|
@lzchen Yes as far as I am aware! A quick dive into the And in our instrumentation we do the following for the So the trace is recording twice. |
Contributor
Contributor
Author
|
@lzchen That's a fair ask, I see that the Further |
Contributor
|
Not a blocker for this pr, but we should probably move the context variable to a common location like here. |
lzchen
approved these changes
Jul 13, 2021
codeboten
approved these changes
Jul 14, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
I noticed that if I instrument both
urllib3andbotocorethat I will get 2 traces (e.g. S3 and s3.amazon.com) when I should only get 1.Before this fix:
After this fix:
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
The first way I thought to write a test for this would be to create an instance of the
urllib3Instrumentorand prove that only 1 trace gets created, but since this is a common pattern among all the instrumentation libraries I didn't add it.Let me know if this would be useful though!
Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.
- [] Unit tests have been added- [ ] Documentation has been updated