-
Notifications
You must be signed in to change notification settings - Fork 907
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Asynchronous messaging span attributes #395
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Semantic conventions for asynchronous messaging spans | ||
|
||
For call publishing a message to the bus, the `SpanKind` MUST be `Producer`. | ||
For call retrieving a message from the bus, the `SpanKind` MUST be `Consumer`. | ||
|
||
## Common Attributes | ||
|
||
| Attribute name | Notes and examples | Required? | | ||
| :------------- | :----------------------------------------------------------- | --------- | | ||
| `message_bus.destination` | An address at which messages can be exchanged. E.g. A Kafka record has an associated "topic name" that can be extracted by the instrumented producer or consumer and stored using this tag. | Yes | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this really required? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With the removal of the 'component' attribute, having at least one required attribute facilitates branching logic. I don't know of any use case where this value won't exist. It could be argued though that this would be used as the name of the span in most cases. |
||
| `message_bus.type` | The brand of message bus or client API library such as `"kafka"`, `"rabbitmq"` or `"jms"`. | Yes | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this should be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I followed the same conventions as the database spec which uses There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think |
||
| `message_bus.protocol` | The transport protocol such as `"AMQP"` or `"MQTT"`. | No | | ||
| `message_bus.user` | Username for accessing bus. E.g., `"tibuser1"` or `"consumer_user"`. | No | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry not to much experience here, but who is the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the username the client uses to authenticate with the message bus instance. In other words, 'message_bus.user' is the equivalent of 'db.user' There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why it is not |
||
| `message_bus.url` | Connection substring such as `"tibjmsnaming://localhost:7222"` or `"https://queue.amazonaws.com/80398EXAMPLE/MyQueue"`. | No | | ||
|
||
Additionally at least one of `net.peer.name` or `net.peer.ip` from the [network attributes][] is required and `net.peer.port` is recommended. | ||
|
||
[network attributes]: data-span-general.md#general-network-connection-attributes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like
message_bus
could be shortened tomessage
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, what is a message bus? In my understanding there are message queues (anycast) and topics (broadcast). A bus sounds like something used to implement a topic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This lingo comes over from OpenTracing: https://github.com/opentracing/specification/blob/master/semantic_conventions.md#message-bus
I'm fine with calling it
message
though one could argue that is too vague.