Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
4d1d3f5
ref(boto3): split integration into internal modules
pabloDeputter Sep 18, 2026
0c23830
ref(boto3): Move consts to
pabloDeputter Sep 21, 2026
b45f76c
fix(boto3): Move imports
pabloDeputter Sep 21, 2026
ab843bc
ref(boto3): Remove dupliocate `_check_minimum_version()`
pabloDeputter Sep 30, 2026
b21b888
ref(boto3): Update integration checks to use IDENTIFIER constant
pabloDeputter Sep 30, 2026
f91d311
fix(boto3): harden StreamingBody span finalization
pabloDeputter Sep 18, 2026
ec2a236
lint
pabloDeputter Sep 18, 2026
3b53fa4
ref(boto3): renaming vars
pabloDeputter Sep 21, 2026
eea1fc1
ref(boto3): Add specific comment on why we initialize with
pabloDeputter Sep 21, 2026
364f547
fix(boto3): ensure span finishes correctly when reading streaming body
pabloDeputter Sep 21, 2026
4f3cfce
fix(boto3): trace the complete client-call lifecycle
pabloDeputter Sep 21, 2026
644aff8
fix merging issues
pabloDeputter Sep 21, 2026
608ee4a
review changes
pabloDeputter Sep 21, 2026
ec8cef7
add test for when `StreamingBody` instrumentation setup fails
pabloDeputter Sep 21, 2026
3a60fb9
fix(boto3): finish streaming spans before legacy boto spans
pabloDeputter Sep 21, 2026
9c2f329
add permalink
pabloDeputter Sep 21, 2026
f9755ca
add some more comments
pabloDeputter Sep 21, 2026
a9e87f5
ref(boto3): use permalink
pabloDeputter Sep 29, 2026
2647da1
ref(boto3): fix grammar in comments
pabloDeputter Sep 29, 2026
8518c62
feat(boto3): improve boto3 integration
pabloDeputter Sep 21, 2026
7bf92dd
lint
pabloDeputter Sep 21, 2026
606c630
fix(boto3): overwrite server attributes when request URL is resolved
pabloDeputter Sep 22, 2026
74083ab
ref(boto3): move `aws-api` to `consts.py`
pabloDeputter Sep 29, 2026
7e5ba86
tests(boto3): move `span_streaming` inside method call
pabloDeputter Sep 29, 2026
6868ffd
ref(boto3): move `DEFAULT_PORTS` to `consts.py`
pabloDeputter Sep 29, 2026
d32a43f
ref(boto3): simplify client span lifecycle and header handling
pabloDeputter Sep 18, 2026
822438b
feat(boto3): add attributes to `consts.py`
pabloDeputter Sep 14, 2026
46d24b2
merge changes
pabloDeputter Sep 15, 2026
30d1e3f
add tests
pabloDeputter Sep 17, 2026
250699d
patch correct methods
pabloDeputter Sep 15, 2026
d9edef5
lint
pabloDeputter Sep 18, 2026
90383dc
use ordered search for request id and hist id
pabloDeputter Sep 18, 2026
d482500
ref(boto3): remove redundant span checks during enrichment
pabloDeputter Sep 18, 2026
26fdcb1
fix duplicates when merging
pabloDeputter Sep 18, 2026
eeac30a
use consts and string lookup for `client.getintegration`
pabloDeputter Sep 21, 2026
8b61aac
lint
pabloDeputter Sep 22, 2026
308eb5f
ruff
pabloDeputter Sep 22, 2026
8e4ce5a
ref(boto3): add permalinks
pabloDeputter Sep 29, 2026
832d90d
fix(boto3): add `error.type` to both span kinds
pabloDeputter Sep 29, 2026
0ee5f14
ref(boto3): specify docstring for `_set_span_attributes()` further
pabloDeputter Sep 29, 2026
a8f521e
ref(boto3): use f-string instead
pabloDeputter Sep 29, 2026
2d92b4e
ref(boto3): remove comment regarding `HTTP_REQUEST_RESEND_COUNT`
pabloDeputter Sep 29, 2026
12dd5e6
ref(boto3): remove `else` block
pabloDeputter Sep 29, 2026
21794bf
tests(boto3): remove uncessary testcases
pabloDeputter Sep 29, 2026
7859e97
ref(boto3): remove uncessary defensive conditionals
pabloDeputter Sep 29, 2026
1f4e936
fix flaky test
pabloDeputter Sep 30, 2026
02a8fa1
add base `ServiceExtension` class
pabloDeputter Sep 18, 2026
ee7e768
feat(boto3): Add service registry
pabloDeputter Sep 18, 2026
4d9ae30
add missing `__init__.py` file
pabloDeputter Sep 18, 2026
e90b407
simplify `_resolve_service()` logic
pabloDeputter Sep 18, 2026
af519a0
add service extension logic to `_instrumentation.py`
pabloDeputter Sep 18, 2026
98cc2a4
combine span-config extraction and validation in `_start_client_span()`
pabloDeputter Sep 18, 2026
ca7e449
add service extension logic to `_client.py`
pabloDeputter Sep 30, 2026
f95f4fe
add tests
pabloDeputter Sep 18, 2026
b0b9f0c
fix(boto3): Remove "hardcoded" origin
pabloDeputter Sep 22, 2026
7d645b4
feat(boto3): Add `sentry.kind` attribute to boto span
pabloDeputter Sep 22, 2026
64e1464
ref(boto3): Add comment explaining
pabloDeputter Sep 22, 2026
f221d72
Update sentry_sdk/integrations/boto3/_services/base.py
pabloDeputter Sep 29, 2026
a106f76
fix(boto3): correct `AWS_RPC_SYSTEM_NAME` constant
pabloDeputter Sep 29, 2026
032eff3
ref(boto3): refactor `get_span_config()` into `get_span_op()` and `ge…
pabloDeputter Sep 29, 2026
b1d9551
ref(boto3): remove attribute-precedence
pabloDeputter Sep 29, 2026
c2f4f6b
ref(boto3): remove lazy-loading approach; replace with static map
pabloDeputter Sep 30, 2026
a928e74
fix(boto3): make logic clearer
pabloDeputter Sep 30, 2026
2d85548
ref(boto3): change comment's and simplify logic
pabloDeputter Sep 30, 2026
9d2bd96
ref(boto3): remove defensive checks
pabloDeputter Sep 30, 2026
b65c0ca
ref(boto3): remove defensive checks and cleanup comments
pabloDeputter Sep 30, 2026
1270b49
cleanup tests
pabloDeputter Sep 30, 2026
91c9bdb
remove AI comment
pabloDeputter Sep 30, 2026
f2a2bc6
feat(attributes): Add s3 relevant attributes to `SPANDATA`
pabloDeputter Sep 22, 2026
0e948cb
feat(boto3): Register s3 to `_SERVICE_EXTENSIONS`
pabloDeputter Sep 30, 2026
a3629db
feat(boto3): Add attribute extraction helpers
pabloDeputter Sep 22, 2026
7c39a6c
feat(boto3): Add S3 extensio
pabloDeputter Sep 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
ref(boto3): remove lazy-loading approach; replace with static map
  • Loading branch information
pabloDeputter committed Sep 30, 2026
commit c2f4f6ba4c2f4ff1a381f38f34bc5c5e86f21986
32 changes: 10 additions & 22 deletions sentry_sdk/integrations/boto3/_services/registry.py
Original file line number Diff line number Diff line change
@@ -1,33 +1,21 @@
from functools import lru_cache
from importlib import import_module
from typing import TYPE_CHECKING

from sentry_sdk.integrations.boto3._services.base import _ServiceExtension
from sentry_sdk.utils import capture_internal_exceptions

if TYPE_CHECKING:
from typing import Dict, Optional, Tuple
from typing import Dict, Optional

from sentry_sdk.integrations.boto3._services.base import _ServiceExtension


# service modules are imported lazily.
# e.g. `s3` -> (`sentry_sdk.integrations.boto3._services.s3`, `_S3Extension)
_SERVICE_EXTENSIONS: "Dict[str, Tuple[str, str]]" = {}
# when py 3.15 drops, we might want to take a look at using
# a lazy-loading approach using the new `lazy` keyword.
# e.g. {"s3": _S3Extension}
_SERVICE_EXTENSIONS: "Dict[str, _ServiceExtension]" = {}


@lru_cache(maxsize=None)
def _resolve_service(
service: "str",
service_name: "str",
) -> "Optional[_ServiceExtension]":
>
if target is None:
return None

with capture_internal_exceptions():
module_name, class_name = target
extension_class = getattr(import_module(module_name), class_name)
candidate = extension_class()
if isinstance(candidate, _ServiceExtension):
return candidate

if service_name in _SERVICE_EXTENSIONS:
return _SERVICE_EXTENSIONS[service_name]
# preserve generic instrumentation when lookup fails.
return None