Repository navigation
Decouple shared test expectations from AgentInstrumentationExtension - #20906
Merged
Merged
Conversation
Pull request dashboard statusMerged · refreshed 2026-10-26 19:45 UTC Status above doesn't look right?
|
Co-authored-by: trask <218610+trask@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Remove concrete agent-extension type checks from tests
Decouple shared test expectations from AgentInstrumentationExtension
Oct 23, 2026
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The test-only refactor preserves fixture-specific expectations and configuration sources, with no unresolved blocking issues.
No open issues 🎉
What changed in this PR
Decouples shared AWS SDK and JDBC test expectations from AgentInstrumentationExtension, preparing for testing-infrastructure separation without changing production behavior, modules, or dependencies.
Changes:
- Replaces concrete extension checks with overridable expectation hooks.
- Preserves AWS agent property-based expectations and library builder-aligned expectations.
- Adds a SQLite connection-initialization span hook enabled only by the JDBC agent fixture.
| File | Description |
|---|---|
instrumentation/jdbc/testing/src/main/java/io/opentelemetry/instrumentation/jdbc/testing/AbstractJdbcInstrumentationTest.java |
Adds the SQLite initialization-span expectation hook. |
instrumentation/jdbc/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/jdbc/test/JdbcInstrumentationTest.java |
Enables SQLite initialization-span expectations. |
instrumentation/aws-sdk/aws-sdk-2.2/testing/src/main/java/io/opentelemetry/instrumentation/awssdk/v2_2/AbstractAwsSdkTest.java |
Defaults attribute expectations to the library test property. |
instrumentation/aws-sdk/aws-sdk-2.2/testing/src/main/java/io/opentelemetry/instrumentation/awssdk/v2_2/AbstractAws2SqsBaseTest.java |
Defaults receive-telemetry expectations to the library test property. |
instrumentation/aws-sdk/aws-sdk-2.2/testing/src/main/java/io/opentelemetry/instrumentation/awssdk/v2_2/AbstractAws2ClientRecordHttpErrorTest.java |
Defaults HTTP-error expectations to the library test property. |
instrumentation/aws-sdk/aws-sdk-2.2/javaagent/src/testRdsData/java/io/opentelemetry/javaagent/instrumentation/awssdk/v2_2/Aws2RdsDataTest.java |
Preserves agent experimental-attribute expectations. |
instrumentation/aws-sdk/aws-sdk-2.2/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/awssdk/v2_2/QueryProtocolModelTest.java |
Preserves agent experimental-attribute expectations. |
instrumentation/aws-sdk/aws-sdk-2.2/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/awssdk/v2_2/Aws2SqsTracingTest.java |
Preserves agent attribute and receive-telemetry expectations. |
instrumentation/aws-sdk/aws-sdk-2.2/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/awssdk/v2_2/Aws2SqsSuppressReceiveSpansTest.java |
Preserves agent attribute and receive-telemetry expectations. |
instrumentation/aws-sdk/aws-sdk-2.2/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/awssdk/v2_2/Aws2ClientTest.java |
Preserves agent experimental-attribute expectations. |
instrumentation/aws-sdk/aws-sdk-2.2/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/awssdk/v2_2/Aws2ClientRecordHttpErrorTest.java |
Preserves agent attribute and HTTP-error expectations. |
instrumentation/aws-sdk/aws-sdk-1.11/testing/src/main/java/io/opentelemetry/instrumentation/awssdk/v1_11/AbstractSqsTracingTest.java |
Defaults receive-telemetry expectations to the library test property. |
instrumentation/aws-sdk/aws-sdk-1.11/testing/src/main/java/io/opentelemetry/instrumentation/awssdk/v1_11/AbstractAwsSdkTest.java |
Defaults attribute expectations to the library test property. |
instrumentation/aws-sdk/aws-sdk-1.11/javaagent/src/testSqsNoReceiveTelemetry/java/io/opentelemetry/javaagent/instrumentation/awssdk/v1_11/SqsSuppressReceiveSpansTest.java |
Preserves agent experimental-attribute expectations. |
instrumentation/aws-sdk/aws-sdk-1.11/javaagent/src/testSqs/java/io/opentelemetry/javaagent/instrumentation/awssdk/v1_11/SqsTracingTest.java |
Preserves agent attribute and receive-telemetry expectations. |
instrumentation/aws-sdk/aws-sdk-1.11/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/awssdk/v1_11/StepFunctionsClientTest.java |
Preserves agent experimental-attribute expectations. |
instrumentation/aws-sdk/aws-sdk-1.11/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/awssdk/v1_11/SnsClientTest.java |
Preserves agent experimental-attribute expectations. |
instrumentation/aws-sdk/aws-sdk-1.11/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/awssdk/v1_11/S3ClientTest.java |
Preserves agent experimental-attribute expectations. |
instrumentation/aws-sdk/aws-sdk-1.11/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/awssdk/v1_11/RdsClientTest.java |
Preserves agent experimental-attribute expectations. |
instrumentation/aws-sdk/aws-sdk-1.11/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/awssdk/v1_11/LambdaClientTest.java |
Preserves agent experimental-attribute expectations. |
instrumentation/aws-sdk/aws-sdk-1.11/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/awssdk/v1_11/KinesisClientTest.java |
Preserves agent experimental-attribute expectations. |
instrumentation/aws-sdk/aws-sdk-1.11/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/awssdk/v1_11/Ec2ClientTest.java |
Preserves agent experimental-attribute expectations. |
instrumentation/aws-sdk/aws-sdk-1.11/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/awssdk/v1_11/DynamoDbClientTest.java |
Preserves agent experimental-attribute expectations. |
Review effort: Balanced
Preserve the PR's fixture expectation hooks and the incoming ElasticMQ bound-port setup, removing both obsolete imports. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
laurit
approved these changes
Oct 26, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Working towards #3484
Replace six concrete agent-extension checks in shared AWS SDK and JDBC tests with expectation hooks. This is standalone preparatory cleanup for separating testing infrastructure; no modules, dependencies, or production behavior change.