whether opentelemetry traceId is supported
How to support OpenTelemetry traceId? I used the OpenTelemetry agent but found the traceId is not correlated.
There are two ways to do this
- We need to add a middleware which will inject the open telemetry and initialise it.
- Add annotation on the handler method which will inject trace ids.
There are two ways to do this
- We need to add a middleware which will inject the open telemetry and initialise it.
- Add annotation on the handler method which will inject trace ids.
are there any cases available for reference? thank you very much.
Did you check adding @WithSpan on the listener method? It should work in most of the cases, as I'm not sure about your current project setup so I can't comment which annotation should be used in your project.
If nothing works you can add a middleware like its done here and you can create span and end the span in the finally block.
There're many builtin middlewares defined here https://github.com/sonus21/rqueue/tree/master/rqueue-core/src/main/java/com/github/sonus21/rqueue/core/middleware
You can customize one of them or create new one. Once middleware class is created you can register them via SimpleRqueueListenerContainerFactory.setMiddlewares.
https://github.com/sonus21/rqueue/blob/master/docs/message-handling/middleware.md
Did you check adding
@WithSpanon the listener method? It should work in most of the cases, as I'm not sure about your current project setup so I can't comment which annotation should be used in your project.If nothing works you can add a middleware like its done here and you can create span and end the span in the finally block.
There're many builtin middlewares defined here https://github.com/sonus21/rqueue/tree/master/rqueue-core/src/main/java/com/github/sonus21/rqueue/core/middleware
You can customize one of them or create new one. Once middleware class is created you can register them via
SimpleRqueueListenerContainerFactory.setMiddlewares.https://github.com/sonus21/rqueue/blob/master/docs/message-handling/middleware.md
Thanks for guiding me. I'll give it a shot.