Skip to content
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

Conversation

kbrockhoff
Copy link
Member

No description provided.


| 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 |
Copy link
Contributor

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 to message.

Copy link
Member

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.

Copy link
Contributor

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.

Copy link
Contributor

@tedsuo tedsuo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a great start and I believe we could iterate from here.


| 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 |
Copy link
Contributor

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.

@jmacd
Copy link
Contributor

jmacd commented Dec 18, 2019

I would accept pubsub as a prefix, too.

@kbrockhoff
Copy link
Member Author

I am fine with pubsub instead of message_bus. I don't think message would be a good idea because of its use in event attributes. If we could hear from some more people, maybe we can arrive at a consensus on what the name should be.


| 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 |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really required?

Copy link
Member Author

Choose a reason for hiding this comment

The 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.

| 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 |
| `message_bus.type` | The brand of message bus or client API library such as `"kafka"`, `"rabbitmq"` or `"jms"`. | Yes |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be name? Type does not sound like what the description suggests.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I followed the same conventions as the database spec which uses db.type

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think type in the db conventions refers more to the flavor of db like sql instead of a specific sql database. For instance mysql, postgresql, ms sql server, and sqlite may all have type = sql

| `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 |
| `message_bus.type` | The brand of message bus or client API library such as `"kafka"`, `"rabbitmq"` or `"jms"`. | Yes |
| `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 |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry not to much experience here, but who is the user in this case?

Copy link
Member Author

Choose a reason for hiding this comment

The 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'

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why it is not peer.user I feel like we have too many users, and may better to standardize as peer or other category and use that everywhere.

@kbrockhoff
Copy link
Member Author

Withdrawing because Dynatrace is getting ready to submit a more comprehensive specification covering this area.

@kbrockhoff kbrockhoff closed this Jan 22, 2020
@kbrockhoff kbrockhoff deleted the async-msg-sem-conventions-#362 branch January 22, 2020 22:55
arminru added a commit to dynatrace-oss-contrib/opentelemetry-specification that referenced this pull request Jan 23, 2020
arminru added a commit to dynatrace-oss-contrib/opentelemetry-specification that referenced this pull request Feb 17, 2020
arminru added a commit to dynatrace-oss-contrib/opentelemetry-specification that referenced this pull request Apr 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants