You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: instrumentation/aws-sdk/src/test/java/software/amazon/opentelemetry/javaagent/instrumentation/awssdk_v1_11/AwsSdkExperimentalAttributesInjectionTest.java
+36-18Lines changed: 36 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,14 @@
34
34
importorg.junit.jupiter.api.BeforeEach;
35
35
importorg.junit.jupiter.api.Test;
36
36
37
+
/*
38
+
* NOTE: V1.11 attribute extraction is difficult to test in unit tests due to reflection-based
39
+
* method access via MethodHandle. Many tests here only verify that the extractor correctly
40
+
* identifies different AWS service types rather than actual attribute extraction. However, these
41
+
* attributes are comprehensively tested in the contract tests which provide end-to-end validation
42
+
* of the reflection-based extraction logic. The contract tests cover most V1.11 attributes
Copy file name to clipboardExpand all lines: instrumentation/aws-sdk/src/test/java/software/amazon/opentelemetry/javaagent/instrumentation/awssdk_v2_2/AwsSdkExperimentalAttributesInjectionTest.java
+72-11Lines changed: 72 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,12 @@
28
28
importsoftware.amazon.awssdk.core.SdkRequest;
29
29
importsoftware.amazon.awssdk.core.SdkResponse;
30
30
31
+
/*
32
+
* NOTE: V2.2 attribute extraction uses direct field access via getValueForField() method.
33
+
* These tests can fully verify attribute extraction by mocking the field values and verifying
34
+
* the correct attributes are set on the span. This provides comprehensive coverage of the
35
+
* attribute extraction logic, supplementing the V2 contract tests.
0 commit comments