Package brave.messaging
Class MessagingRequest
java.lang.Object
brave.Request
brave.messaging.MessagingRequest
- Direct Known Subclasses:
ConsumerRequest
,ProducerRequest
public abstract class MessagingRequest extends Request
Abstract request type used for parsing and sampling of messaging producers and consumers.
- Since:
- 5.9
- See Also:
ProducerRequest
,ConsumerRequest
-
Method Summary
Modifier and Type Method Description abstract String
channelKind()
Type of channel, e.g.abstract String
channelName()
Messaging channel name, e.g.String
messageId()
The possibly system generated value that identifies this message across one or more links.abstract String
operation()
The unqualified, case-sensitive semantic message operation name.
-
Method Details
-
operation
The unqualified, case-sensitive semantic message operation name. The currently defined names are "send" and "receive".Examples:
- Amazon SQS -
AmazonSQS.sendMessageBatch()
is a "send" operation - JMS -
MessageProducer.send()
is a "send" operation - Kafka -
Consumer.poll()
is a "receive" operation - RabbitMQ -
Consumer.handleDelivery()
is a "receive" operation
Note: There is no constant set of operations, yet. Even when there is a constant set, there may be operations such as "browse" or "purge" which aren't defined. Once implementation matures, a constant file will be defined, with potentially more names.
- Returns:
- the messaging operation or null if unreadable.
- Since:
- 5.9
- Amazon SQS -
-
channelKind
Type of channel, e.g. "queue" or "topic".null
if unreadable.Conventionally associated with the tag "messaging.channel_kind"
- Since:
- 5.9
- See Also:
channelName()
-
channelName
Messaging channel name, e.g. "hooks" or "complaints".null
if unreadable.Conventionally associated with the tag "messaging.channel_name"
- Since:
- 5.9
- See Also:
channelKind()
-
messageId
The possibly system generated value that identifies this message across one or more links. Ex "ID:10.77.42.209-4280-1477454185311-1:1:1391:1:1". Returnnull
if the ID was unreadable or the transport has no canonical message ID.This is conventionally associated with the tag "messaging.id"
Notes
Most commonly, a consumer can read this value at request time, but a producer cannot until response time. Sometimes the values seen by either side are different.When there's no field named "message ID", there could be an offset or sequence ID.
- Since:
- 5.13
-