[Service Bus] Prepare tracing methods for message processor and scheduleMessage#16524
Conversation
…TION_STRING" This reverts commit 0ce8d23
| } | ||
|
|
||
| public static ServiceBusMessage traceMessageSpan(ServiceBusMessage serviceBusMessage, | ||
| Context messageContext, String hostname, String entityPath, TracerProvider tracerProvider) { |
There was a problem hiding this comment.
How does Kind fits into this ?, should that be passed here ?
https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/core/azure-core/src/main/java/com/azure/core/util/tracing/ProcessKind.java
@samvaity Can you look into this PR ?
There was a problem hiding this comment.
ProcessKind.MESSAGE should be used to create a message. Just like in EventHubs.
There was a problem hiding this comment.
The ProcessKind helps the tracer apply specific attributes on the span. For example, in the case of MESSAGE, the tracer will attribute the spanType=Producer, here
There was a problem hiding this comment.
@samvaity is this javadoc misleading? It looks like MESSAGE is used for receiving.
/**
* Amqp message process call to receive data.
*/
MESSAGE,There was a problem hiding this comment.
Yeah, I think we initially had this as RECEIVE and later updated to MESSAGE so the left over javadoc. But yes it should be updated to suit process kind "message". AMQP process kind for message spans.
…ure/messaging/servicebus/implementation/MessageUtils.java Co-authored-by: Srikanta <51379715+srnagar@users.noreply.github.com>
samvaity
left a comment
There was a problem hiding this comment.
Tracing changes looking good.
Consider adding unit tests.
EventHubs has distributed tracing for sending out events and processing events. ServiceBus already has tracing for sending. This PR is to prepare the tracing utility functions for the message processor (to be added, feature requirement #16087).
It also separates method
traceMessageSpanfromServiceBusMessageBatchsoscheduleMessagewill also be able to use it in the future.The full feature of distributed tracing for ServiceBus for all languages is still under discussion with the service team.
closes #15622