{{ message }}
Repository navigation
Commit 014769c
feat(boto3): Add
### Description
Adds service-extension support to `Boto3Integration`. This keeps the
generic Boto3 call lifecycle independent of individual AWS services.
- Adds `_ServiceExtension` interface for service-specific behavior
through `_get_span_config()`, `_get_request_attributes()`, and
`_get_response_attributes()`. This allows for custom span
operations/origin, request attributes, and response/error attributes. A
future method can also inject trace context into service-specific
payload, e.g. SQS message attributes.
- Extensions are lazily imported (not sure whether this actually a good
thing). Service modules are only imported on first use and falls back to
generic behavior when service is unknown or broken.
- Generic attributes and errors remain authoritative over
service-specific ones.
- `sentry.kind` is added to every boto3 span and defaults to
`sentry.kind="client"`; service extensions can override this later, e.g.
[SQS](https://opentelemetry.io/docs/specs/semconv/messaging/sqs/#send-span-producer)/[SNS](https://opentelemetry.io/docs/specs/semconv/messaging/sns/#aws-sns-spans)
send `sentry.kind="producer"` or SQS receive use
[`sentry.kind="consumer"`](https://opentelemetry.io/docs/specs/semconv/messaging/sqs/#process-span)
/
[`sentry.kind="client"`](https://opentelemetry.io/docs/specs/semconv/messaging/sqs/#receive-span)
#### Issues
Resolves getsentry#7477
---------
Co-authored-by: Erica Pisani <hey@ericapisani.dev>ServiceExtension class (getsentry#7536)1 parent e899330 commit 014769c
8 files changed
Lines changed: 308 additions & 304 deletions
File tree
- sentry_sdk
- integrations/boto3
- _services
- tests/integrations/boto3
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
17 | 20 | | |
18 | 21 | | |
19 | 22 | | |
20 | 23 | | |
21 | 24 | | |
22 | | - | |
| 25 | + | |
23 | 26 | | |
| 27 | + | |
24 | 28 | | |
25 | 29 | | |
26 | 30 | | |
27 | 31 | | |
| 32 | + | |
28 | 33 | | |
29 | 34 | | |
30 | 35 | | |
| |||
34 | 39 | | |
35 | 40 | | |
36 | 41 | | |
37 | | - | |
| 42 | + | |
38 | 43 | | |
39 | 44 | | |
40 | 45 | | |
41 | 46 | | |
42 | | - | |
| 47 | + | |
43 | 48 | | |
44 | 49 | | |
45 | 50 | | |
| |||
74 | 79 | | |
75 | 80 | | |
76 | 81 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
81 | 86 | | |
82 | 87 | | |
83 | | - | |
| 88 | + | |
84 | 89 | | |
85 | 90 | | |
86 | 91 | | |
| |||
93 | 98 | | |
94 | 99 | | |
95 | 100 | | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | 101 | | |
103 | 102 | | |
104 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
105 | 109 | | |
106 | 110 | | |
107 | 111 | | |
108 | 112 | | |
109 | 113 | | |
110 | 114 | | |
111 | 115 | | |
| 116 | + | |
112 | 117 | | |
113 | 118 | | |
114 | 119 | | |
115 | 120 | | |
116 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
117 | 129 | | |
118 | | - | |
| 130 | + | |
119 | 131 | | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
120 | 139 | | |
121 | | - | |
| 140 | + | |
122 | 141 | | |
123 | 142 | | |
124 | 143 | | |
| |||

0 commit comments