Span Data Conventions
The Span Interface specifies a series of timed application events that have a start and end time. Below describes the conventions for the Span interface for the data
field on the span.
The data
field on the span is expected to follow OpenTelemetry's semantic conventions for attributes as much as possible.
Keys on the data
field should be lower-case and use underscores instead of camel-case. There are some exceptions to this, but these exist because of backwards compatability.
Below describes the conventions for the Span interface for the data
field on the span that are currently used by the product or are important to bring up.
HTTP
Attribute | Type | Description | Examples |
---|---|---|---|
http.query | string | The Query string present in the URL. | ?foo=bar&bar=baz |
http.fragment | string | The Fragments present in the URL. | #foo=bar |
http.method | string | The HTTP method used. | GET |
http.response.status_code | int | The status HTTP response. | 404 |
http.response_content_length | number | The encoded body size of the response. | 123 |
http.decoded_response_body_length | number | The decoded body size of the response. | 456 |
http.response_transfer_size | number | The transfer size of the response. | 789 |
Mobile
Attribute | Type | Description | Examples |
---|---|---|---|
blocked_main_thread | boolean | Whether the main thread was blocked by the span. | true |
call_stack | StackFrame[] | The most relevant stack frames, that lead to the File I/O span. The stack frame should adhere to the StackFrame interface. |
Browser
Attribute | Type | Description | Examples |
---|---|---|---|
url | string | The URL of the resource that was fetched. | https://example.com |
type | string | The type of the resource that was fetched. | xhr |
resource.render_blocking_status | string | The render blocking status of the resource. | non-blocking |
Database
Attribute | Type | Description | Examples |
---|---|---|---|
db.system | string | An identifier for the database management system (DBMS) product being used. See OpenTelemetry docs for a list of well-known identifiers. | postgresql |
db.operation | string | The name of the operation being executed, e.g. the MongoDB command name such as findAndModify, or the SQL keyword. Based on OpenTelemetry's call level db attributes | SELECT |
Web Server
Attribute | Type | Description | Examples |
---|---|---|---|
cache.hit | boolean | If the cache was hit during this span. | true |
cache.item_size | int | The size of the requested item in the cache. In bytes. | 58 |
Deprecated
Names that SDKs are still sending so we cannot remove them yet, but should not be used in new code.
Attribute | New name |
---|---|
method | http.method |
Encoded Body Size | http.response_content_length |
Decoded Body Size | http.decoded_response_body_length |
Transfer Size | http.response_transfer_size |
You can edit this page on GitHub.