Skip to content

Conversation

anahatAWS
Copy link
Contributor

Issue

Note: this is the second part of the implementation for issue #1091

This PR introduces a new SPI-based implementation for AWS SDK v1.11 instrumentation that:

  • Leverages OpenTelemetry's InstrumentationModule extension mechanism
  • Extends the AWS SDK RequestHandler2 to apply custom instrumentation
  • Replaces Git patches with proper SPI implementation
  • Ensures AWS-specific instrumentation runs after core OpenTelemetry instrumentation
  • Maintains all existing functionality while improving maintainability

The SPI instrumentation module is under 'instrumentation/aws-sdk.' There is also a custom 'AdotTracingRequestHandler' for this implementation for ensure correct instrumentation for files that required patching previously. The README.md file in instrumentation/aws-sdk contains a detailed explanation of this implementation.

Testing

To validate the SPI implementation, I utilized the existing AppSignals contract tests. These tests were originally designed to verify AWS SDK v1 instrumentation behaviour. The tests specifically assert that AWS-specific span attributes are correctly captured in the mock collector (i.e. tests git patching logic).

By removing the AWS SDK v1.11 git patching logic from the patching script and running these same contract tests, I could verify that the SPI implementation maintains identical instrumentation behaviour without requiring patches. The successful passing of all AWS SDK v1 contract tests confirms that the SPI implementation correctly generates the expected spans and attributes, effectively replacing the previous patching mechanism.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

anahatAWS added 30 commits May 27, 2025 10:58
…ptor after request has been marshalled into HTTP requestion, but before it is sent
@anahatAWS anahatAWS requested a review from a team as a code owner June 23, 2025 16:49
@anahatAWS anahatAWS closed this Jun 27, 2025
@anahatAWS anahatAWS deleted the spi-1.11 branch August 7, 2025 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant