-
Notifications
You must be signed in to change notification settings - Fork 667
feat(boto3): trace logical AWS calls with common attributes #7481
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
Draft
pabloDeputter
wants to merge
12
commits into
master
Choose a base branch
from
pablo/improve-boto3-call-lifecycle
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
e570dfd
feat(boto3): improve boto3 integration
pabloDeputter 47997b0
remove everything related to service-extension
pabloDeputter c5896e2
remove tests related to service extension
pabloDeputter d91abca
more removal related to service-enrichment
pabloDeputter ec6dffe
fix(boto3): add back `origin`
pabloDeputter 6cee882
tests(boto3): update `test_s3.py` to match new `Service.Operation` sp…
pabloDeputter 5771275
lint
pabloDeputter c5712ab
remove unused fields from context
pabloDeputter 2ba1efb
use `SPANDATA.HTTP_REQUEST_RESEND_COUNT` instead of magic `http.reque…
pabloDeputter 63fee2e
remove all logic related to #7476
pabloDeputter 93929e6
fix(tests): simplify response handling
pabloDeputter e384637
refactor(tests): update client tests to include endpoint URL and serv…
pabloDeputter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| from sentry_sdk.integrations import DidNotEnable, Integration, _check_minimum_version | ||
| from sentry_sdk.utils import parse_version | ||
|
|
||
| try: | ||
| from botocore import __version__ as BOTOCORE_VERSION | ||
| except ImportError: | ||
| raise DidNotEnable("botocore is not installed") | ||
|
|
||
|
|
||
| class Boto3Integration(Integration): | ||
| identifier = "boto3" | ||
| origin = f"auto.http.{identifier}" | ||
|
|
||
| @staticmethod | ||
| def setup_once() -> None: | ||
| version = parse_version(BOTOCORE_VERSION) | ||
| _check_minimum_version(Boto3Integration, version, "botocore") | ||
|
|
||
| # local import to avoid import cycle | ||
| from sentry_sdk.integrations.boto3._client import _patch_botocore_client | ||
|
|
||
| _patch_botocore_client() |
Oops, something went wrong.
Oops, something went wrong.
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.
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.
RPC_SYSTEM_NAME uses non-standard attribute key rpc.system.name
Use
rpc.system(OTEL AWS SDK / RPC semconv), notrpc.system.name; otherwise AWS spans emit a non-standard attribute backends won't recognize.Evidence
RPC_SYSTEM_NAME = "rpc.system.name"._get_client_attributes()insentry_sdk/integrations/boto3/_instrumentation.pysetsSPANDATA.RPC_SYSTEM_NAMEto"aws-api"on every client span.rpc.system=aws-api(same docs linked in that helper); RPC conventions userpc.system, unlike DB'sdb.system.name.Identified by Warden · find-bugs · VD7-M84