You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment messaging transactions are fully handled by the instrumentation of the used underlying messaging technology.
This means that for example Transactions are simply named like Receive message from Topic/Queue XY.
Imo it would be more developer-friendly to do the naming similar to how we do it for spring-web-mvc: We should use the actual entry-method into the user-code as transaction name. Depending on the used messaging technology, these are bean methods annotated with @KafkaListener, @JmsListener or @RabbitListener.
In addition we currently are missing proper failure detection for spring message handlers. Spring catches exceptions thrown by the user-provided messagehandler, meaning that they never reach our messaging-technology instrumentation layer. It would be great to mark the transactions as failed and to record the exception when a handler throws one.
I didn't investiage further, but org.springframework.messaging.handler.invocation.InvocableHandlerMethod#invoke looks like it might be a good universal instrumentation point for recording the method names of handlers registered via the annotations listed above.
However, we need to take care that we do not mess up the naming when listeners are registered programatically.
For the failure/exception detection we should use an instrumentation point which is used for both types of handlers (annotation-based and programatically registered).
The text was updated successfully, but these errors were encountered:
For the naming part, please take a look at this naming issue. I only collected the data and people thoughts, but it did not progress from there.
In the messaging section there were very few votes (I think there were no messaging instrumentations in most agents at the time I did this), but I think the preferable choice was going with the OTel schema.
Feel free to modify this issue or push this forward to any direction.
At the moment messaging transactions are fully handled by the instrumentation of the used underlying messaging technology.
This means that for example Transactions are simply named like
Receive message from Topic/Queue XY
.Imo it would be more developer-friendly to do the naming similar to how we do it for
spring-web-mvc
: We should use the actual entry-method into the user-code as transaction name. Depending on the used messaging technology, these are bean methods annotated with@KafkaListener
,@JmsListener
or@RabbitListener
.In addition we currently are missing proper failure detection for spring message handlers. Spring catches exceptions thrown by the user-provided messagehandler, meaning that they never reach our messaging-technology instrumentation layer. It would be great to mark the transactions as failed and to record the exception when a handler throws one.
I didn't investiage further, but
org.springframework.messaging.handler.invocation.InvocableHandlerMethod#invoke
looks like it might be a good universal instrumentation point for recording the method names of handlers registered via the annotations listed above.However, we need to take care that we do not mess up the naming when listeners are registered programatically.
For the failure/exception detection we should use an instrumentation point which is used for both types of handlers (annotation-based and programatically registered).
The text was updated successfully, but these errors were encountered: