Replies: 1 comment
-
Sure it can. Sky is the limit! You could post process the bytecode or use an annotation processor to find the annotated methods and from the method with the piece of code that iterates the messages and for each message extract the context and create the span. This probably can be done but is a bit hard. You could simplify the problem by changing your requirements to instead annotating a method that takes a single message as argument. For example if you have something like |
Beta Was this translation helpful? Give feedback.
-
Hi,
I have a situation where I have a listener code, that listens to SQS and on each message, this method is executed. The messages are produced by a Lambda function, that is adding otel parameters traceid and tracestate to message attributes.
On the Java side, I had to create TextMapGetter and retrieve the context. Is there a way of just annotation the class in a way that this context would also be retrieved?
Code snippet below:
`@SpringBootApplication
public class BankFargateApplication {
I would like to annotage te processMessage method, to create a more simple change to application using annotations as we have tons of similar applications, could this be done in anyway?
Beta Was this translation helpful? Give feedback.
All reactions