-
Notifications
You must be signed in to change notification settings - Fork 897
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
Defined additional semantic convention attribute names #383
Closed
kbrockhoff
wants to merge
2
commits into
open-telemetry:master
from
kbrockhoff:misc-semantic-conventions-#362
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | | ||
| `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 | | ||
| `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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Semantic conventions for events | ||
|
||
Event types are identified by the event name. Library and application implementors | ||
are free to define any event name that make sense with the exception of the | ||
following reserved names. | ||
|
||
## Reserved event names | ||
|
||
| Event name | Notes and examples | | ||
| :---------- | :----------------------------------------------------------------- | | ||
| `"message"` | Event with the details of a single message within a span. | | ||
| `"error"` | Event with the details of one captured error, fault or exception. | | ||
|
||
## Message event attributes | ||
|
||
Event `"name"` MUST be `"message"`. | ||
|
||
Message events MUST be associated with a tracing span. | ||
|
||
| Attribute name | Notes and examples | Required? | | ||
| :------------- | :------------------------------------- | --------- | | ||
| `message.type` | Either `"SENT"` or `"RECEIVED"`. | Yes | | ||
| `message.id` | Incremented integer value within the parent span starting with `1`. | Yes | | ||
| `message.compressed_size` | Compressed size in bytes. | No | | ||
| `message.uncompressed_size` | Uncompressed size in bytes. | No | | ||
| `message.content` | The body or main contents of the message. If binary, then message should be Base64 encoded. | No | | ||
|
||
Most exporters will likely drop the `message.content` attribute if present. | ||
However, logging-only exporters will likely want to log it as this information | ||
is highly useful during the early stages of developing a new application. | ||
|
||
## Error event attributes | ||
|
||
Event `"name"` MUST be `"error"`. | ||
|
||
| Attribute name | Notes and examples | Required? | | ||
| :------------- | :------------------------------------- | --------- | | ||
| `error.kind` | The type or "kind" of an error. E.g., `"Exception"`, `"OSError"` | Yes | | ||
| `error.message` | A concise, human-readable, one-line message explaining the event. E.g., `"Could not connect to backend"`, `"Cache invalidation succeeded"` | Yes | | ||
| `error.object` | For languages that support such a thing (e.g., Java, Python), the actual Throwable/Exception/Error object instance itself. E.g., A `java.lang.UnsupportedOperationException` instance, a python `exceptions.NameError` instance | No | | ||
| `error.stack` | A stack trace in platform-conventional format; may or may not pertain to an error. E.g., `"File \"example.py\", line 7, in \<module\>\ncaller()\nFile \"example.py\", line 5, in caller\ncallee()\nFile \"example.py\", line 2, in callee\nraise Exception(\"Yikes\")\n"` | No | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 would put the events to the places they belong to, e.g. message events to messaging conventions, error to general conventions, etc.
We also have status, name and attributes already bundled together and grpc has events right with the other conventions too.
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.
Message events apply to all types of remote calls, not only gRPC.