-
Notifications
You must be signed in to change notification settings - Fork 841
feat: add support for aiobotocore instrumentation #4049
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
base: main
Are you sure you want to change the base?
feat: add support for aiobotocore instrumentation #4049
Conversation
|
@lukeina2z @yiyuan-he wdyt? |
|
|
||
|
|
||
| _instruments = ("botocore ~= 1.0",) | ||
| _aiobotocore_instruments = ("aiobotocore ~= 2.0",) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should looks something like the following so that opentelemetry-bootstrap will work with that.
_instruments_botocore = "botocore ~= 1.0"
_instruments_aiobotocore = "aiobotocore ~= 2.0"
_instruments = ()
_instruments_any = (_instruments_botocore, _instruments_aiobotocore)
|
|
||
| [project.entry-points.opentelemetry_instrumentor] | ||
| botocore = "opentelemetry.instrumentation.botocore:BotocoreInstrumentor" | ||
| aiobotocore = "opentelemetry.instrumentation.botocore:AiobotocoreInstrumentor" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code above should be updated to something like the following:
[project.optional-dependencies]
instruments = []
instruments-any = [
"botocore ~= 1.0",
"aiobotoore ~= 2.0"
]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just want to make sure I'm understanding what you're saying here. Are you suggesting we just have a single opentelemetry_instrumentor entrypoint pointing to the BotocoreInstrumentor class, and only apply the aiobotocore patches if it is installed? I did initially consider this, but I did also want to potentially give users the ability to selectively instrument only aiobotocore or botocore. But in practice, I don't see a reason why you would ever want to do this. WDYT?
| except Exception as ex: # pylint: disable=broad-except | ||
| _logger.error("Error when loading extension: %s", ex) | ||
| return _AwsSdkExtension(call_context) | ||
| _AIOBOTOCORE_EXTENSIONS = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any specific reason why bedrock is not there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description
Adds support for aiobotocore instrumentation, following the implementation approach outlined in issue #4048.
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Unit tests have been added.
Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.