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.
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.
The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path).
/app/myapplication/http/handler/server.py
code.lineno
number
The line number in code.filepath best representing the operation. It SHOULD point within the code unit named in code.function
42
code.function
string
The method or function name, or equivalent (usually rightmost part of the code unit's name).
server_request
code.namespace
string
The "namespace" within which code.function is defined. Usually the qualified class or module name, such that code.namespace + some separator + code.function form a unique identifier for the code unit.
The name of the operation being executed, e.g. the MongoDB command name such as findAndModify, or the SQL keyword. Based on OpenTelemetry's common db attributes
SELECT
db.collection.name
string
The name of the collection (or table, etc) being queried.
users
db.name
string
This attribute is used to report the name of the database being accessed. For commands that switch the database, this should be set to the target database (even if the command fails).
customers
server.address
string
Name of the database host.
example.com
server.port
int
Logical server port number host.
8080
server.socket.address
string
Physical server IP address or Unix socket address. host.
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.request.method
http.method
http.request.method
Encoded Body Size
http.response_content_length
Decoded Body Size
http.decoded_response_body_length
Transfer Size
http.response_transfer_size
Help improve this content Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").