[
https://issues.apache.org/jira/browse/ARTEMIS-2028?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16584055#comment-16584055
]
Carsten Lohmann commented on ARTEMIS-2028:
------------------------------------------
With the additional "onSendError"/"onMessageRouteError" broker plugin methods
and additional methods in the AMQPMessage class to read/set delivery
annotations, I'm able to implement basic OpenTracing support just using a
broker plugin and interceptors (tested with AMQP).
* OpenTracingActiveMQServerPlugin - creating the "send", "route", "deliver"
and "acknowledged" spans
* For AMQP: OpenTracingAmqpIncomingInterceptor,
OpenTracingAmqpOutgoingInterceptor - adopting/setting delivery annotations
into/from generic message properties
It looks like this (only the "Artemis" spans are relevant):
!Artemis-OpenTracing2.png|width=733,height=258!
Thinking about the other protocols:
* For STOMP, no further interceptors should be needed, I guess, as all STOMP
headers are set as generic message properties.
* For MQTT, first there needs to be an agreement, about how the SpanContext
information should be transferred. Without having MQTT 5.0 custom headers yet,
a mechanism of inserting them in a property bag and appending it at the topic
(like URL parameters) would be possible. That would need a corresponding
Interceptor to do this.
* For the other protocols: Are custom headers/properties supported there to
include the SpanContext information?
So, this would be the least invasive solution, keeping all OpenTracing-specific
changes external.
Would you like to have such a broker plugin and the interceptors code kept in
the artemis repo (in an extra maven module)?
Of course, enabling the OpenTracing feature wouldn't be as easy as enabling a
config flag then, but it would be a start.
Or would you opt for a more inclusive integration from the start?
> Add OpenTracing support
> -----------------------
>
> Key: ARTEMIS-2028
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2028
> Project: ActiveMQ Artemis
> Issue Type: New Feature
> Reporter: Carsten Lohmann
> Priority: Major
> Attachments: Artemis-OpenTracing.png, Artemis-OpenTracing2.png
>
>
> In order to get an overview of the lifetime of a message going through
> different messaging components, it would be good to have support for
> distributed tracing in Artemis.
> The [OpenTracing|http://opentracing.io/] standard defines an API for this,
> facilitating the use of different (OpenTracing-compatible) tracing systems
> (e.g. [Jaeger|https://jaegertracing.io/]).
> This would mean more general distributed tracing support than the one
> proposed in ARTEMIS-461.
> To start out with, support could be added to the AMQP protocol, using AMQP
> delivery annotations to get the OpenTracing SpanContext from incoming
> messages and to put the SpanContext into outgoing messages.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)