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 instrumentation for aiobotocore #1520
Conversation
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 is awesome! Very clean way to re-use the botocore instrumentation. 👍
@stj A few tests failing. It appears that with apm-agent-python/elasticapm/instrumentation/packages/botocore.py Lines 61 to 82 in 114ee6c
Can you take a look and see if you can figure out where we're going wrong in the service detection for |
Thanks, the way the library instruments sync and async made this a fairly straight forward change! Though, as I mentioned, this is currently creating two spans for each request to AWS (one created by the instrumentation of My current thinking is to find out if the wrapper for |
Oh, right, sorry, I missed your discussion note. That also probably explains the test failures, we're probably inspecting the http span (which is The correct solution is to mark the spans created by this instrumentation as But...you already are doing that, so there might be a bug. |
TIL |
context manager before the coro gets awaited. refactor common code to limit duplication in sync and async code.
Turns out that not creating an 4e778c9 makes changes to |
/test |
1 similar comment
/test |
What does this pull request do?
This adds instrumentation for aiobotocore. It heavily uses the existing instrumentation from boto3.
I got the tests to run locally for this, but noticed that the instrumentation of
aiohttp.client
already sends spans foraiobotocore
. Though they are not labelled as AWS specific as theboto3
instrumenter does.As is, this implementation currently results in 2 spans for each request. I am looking for some advice on what is the better approach here. Try to remove the wrapper on the
ClientSession
used byaiobotocore
or change the spans created byClientSession
?Related issues
Nothing opened (yet)