Commit 0015e8c
Avoid ClassCastException on every DynamoDB request in AwsSdkClientDecorator (#11285)
Avoid ClassCastException on every DynamoDB request in AwsSdkClientDecorator
`getValueForField("Key", String.class)` was called on every AWS SDK v2
request and a `ClassCastException` was caught on every DynamoDB
Get/Put/Update/Delete item call (Key is `Map<String, AttributeValue>`).
This forced the JVM to fill in a stack trace per request on a hot path.
Gate the `Key` extraction to S3 (the only service whose top-level `Key`
is a `String`), inline the helper, and drop the dead try/catch. Behavior
for S3 is unchanged — `setObjectKey` already wrote the same tag the
DSM-only branch was writing.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Merge branch 'master' into dougqh/aws-sdk-v2-skip-dynamodb-cce
Merge branch 'master' into dougqh/aws-sdk-v2-skip-dynamodb-cce
Merge branch 'master' into dougqh/aws-sdk-v2-skip-dynamodb-cce
Co-authored-by: devflow.devflow-routing-intake <devflow.devflow-routing-intake@kubernetes.us1.ddbuild.io>1 parent 4d2adea commit 0015e8c
1 file changed
Lines changed: 6 additions & 17 deletions
File tree
- dd-java-agent/instrumentation/aws-java/aws-java-sdk-2.2/src/main/java/datadog/trace/instrumentation/aws/v2
Lines changed: 6 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
141 | 142 | | |
142 | 143 | | |
143 | | - | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| |||
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | 282 | | |
294 | 283 | | |
295 | 284 | | |
| |||
0 commit comments