Commit 979e47b
committed
feat: Add instrumentation for Lambda Java interface HandleStreamRequest
Problem:
All Lambda Java users using HandleStreamRequest experience broken application signal traces. This issue affects all Spring Boot 3 users.
Cause:
AWS Lambda for Java provides two handler interfaces:
com.amazonaws.services.lambda.runtime.RequestHandler
com.amazonaws.services.lambda.runtime.RequestStreamHandler
However, instrumentation for RequestStreamHandler is missing in the OpenTelemetry Java agent.
Fix:
Added instrumentation support for RequestStreamHandler.
Test:
Unit tests pass (./gradlew spotlessCheck assemble instrumentation:test).
Manual end-to-end tests pass:
Deployed Lambda functions with Spring Boot 3 and Amazon Serverless Java Container.
Enabled application signals, observed broken traces.
Disabled application signals and added a private build of the Java layer for Lambda with this change.
Verified traces and spans are now correct.
Backward Compatibility:
No risk of breaking existing functionality.
The change only adds instrumentation for RequestStreamHandler without modifying existing behavior for RequestHandler.
Existing users not using RequestStreamHandler remain unaffected.1 parent cd3c2c5 commit 979e47b
File tree
2 files changed
+507
-0
lines changed- lambda-layer
- patches
2 files changed
+507
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| |||
0 commit comments