-
Notifications
You must be signed in to change notification settings - Fork 873
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Message handler #8331
base: main
Are you sure you want to change the base?
Message handler #8331
Conversation
@atshaw43 we already have aws lambda instrumentation in https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation/aws-lambda/aws-lambda-events-2.2/library |
Those are Lambda specific because of the Context variable. This is for non-Lambda cases such as EC2. This is for batching messages, while those classes are for for-loop cases. One message at a time. |
...brary/src/main/java/io/opentelemetry/instrumentation/messagehandler/BatchMessageHandler.java
Outdated
Show resolved
Hide resolved
...ry/src/main/java/io/opentelemetry/instrumentation/messagehandler/SqsBatchMessageHandler.java
Outdated
Show resolved
Hide resolved
@laurit |
...brary/src/main/java/io/opentelemetry/instrumentation/messagehandler/BatchMessageHandler.java
Outdated
Show resolved
Hide resolved
...brary/src/main/java/io/opentelemetry/instrumentation/messagehandler/BatchMessageHandler.java
Outdated
Show resolved
Hide resolved
...brary/src/main/java/io/opentelemetry/instrumentation/messagehandler/BatchMessageHandler.java
Outdated
Show resolved
Hide resolved
@atshaw43 Firstly the module name |
I think this is only sort of true. The code is in many places generic, and I think with a few small adjustments, the interface could be fit for any messages. But at the moment, I agree that it is too AWS-specific. Note that there is also very similar functionality in the AWS Lambda instrumentation, that could be used as inspiration and generalized: https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/aws-lambda/aws-lambda-events-2.2/library/src/main/java/io/opentelemetry/instrumentation/awslambdaevents/v2_2/TracingSqsMessageHandler.java (maybe even in a way that the AWS Lambda instrumentation could re-use code from this new proposed message handler module) |
@laurit |
...2.2/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v2_2/SqsMessageAccess.java
Outdated
Show resolved
Hide resolved
I updated the PR so the MessageHandler focuses on process spans. |
Problem
Adding Message Handler for messaging systems.
These new handlers will create a span for the user and add span links and set the messaging attributes.
Testing
Unit tests