Module opentelemetry_semantic_conventions::trace [−][src]
Trace Semantic Conventions
The trace semantic conventions define a set of standardized attributes to
be used in Span
s.
Usage
use opentelemetry::trace::Tracer; use opentelemetry::global; use opentelemetry_semantic_conventions as semcov; let tracer = global::tracer("my-component"); let _span = tracer .span_builder("span-name") .with_attributes(vec![ semcov::trace::NET_PEER_IP.string("10.0.0.1"), semcov::trace::NET_PEER_PORT.i64(80), ]) .start(&tracer);
Constants
CODE_FILEPATH | The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path). |
CODE_FUNCTION | The method or function name, or equivalent (usually rightmost part of the code unit’s name). |
CODE_LINENO | The line number in |
CODE_NAMESPACE | The “namespace” within which |
DB_CASSANDRA_KEYSPACE | The name of the keyspace being accessed. |
DB_CONNECTION_STRING | The connection string used to connect to the database. |
DB_HBASE_NAMESPACE | The HBase namespace being accessed. |
DB_JDBC_DRIVER_CLASSNAME | The fully-qualified class name of the Java Database Connectivity (JDBC) driver used to connect. |
DB_MONGODB_COLLECTION | The collection being accessed within the database stated in |
DB_MSSQL_INSTANCE_NAME | The Microsoft SQL Server instance name) connecting to. |
DB_NAME | If no tech-specific attribute is defined, this attribute is used to report the name of the database being accessed. |
DB_OPERATION | The name of the operation being executed. |
DB_REDIS_DATABASE_INDEX | The index of the database being accessed as used in the |
DB_STATEMENT | The database statement being executed. |
DB_SYSTEM | An identifier for the database management system (DBMS) product being used. |
DB_USER | Username for accessing the database. |
ENDUSER_ID | Username or client_id extracted from the access token or Authorization header in the inbound request from outside the system. |
ENDUSER_ROLE | Actual/assumed role the client is making the request under extracted from token or application security context. |
ENDUSER_SCOPE | Scopes or granted authorities the client currently possesses extracted from token or application security context. |
EXCEPTION_ESCAPED | SHOULD be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span. |
EXCEPTION_MESSAGE | The exception message. |
EXCEPTION_STACKTRACE | A stacktrace as a string in the natural representation for the language runtime. |
EXCEPTION_TYPE | The type of the exception (its fully-qualified class name, if applicable). |
FAAS_COLDSTART | Indicates that the serverless function is executed for the first time (aka cold start). |
FAAS_CRON | A string containing the schedule period as Cron Expression. |
FAAS_DOCUMENT_COLLECTION | The name of the source on which the operation was performed. |
FAAS_DOCUMENT_NAME | The document name/table subjected to the operation. |
FAAS_DOCUMENT_OPERATION | Describes the type of the operation that was performed on the data. |
FAAS_DOCUMENT_TIME | A string containing the time when the data was accessed in the ISO 8601 format expressed in UTC. |
FAAS_EXECUTION | String containing the execution id of the function. |
FAAS_INVOKED_NAME | The name of the invoked function. |
FAAS_INVOKED_PROVIDER | The cloud provider of the invoked function. |
FAAS_INVOKED_REGION | The cloud region of the invoked function. |
FAAS_TIME | A string containing the function invocation time in the ISO 8601 format expressed in UTC. |
FAAS_TRIGGER | Type of the trigger on which the function is executed. |
HTTP_CLIENT_IP | The IP address of the original client behind all proxies, if known (e.g. from X-Forwarded-For). |
HTTP_FLAVOR | Kind of HTTP protocol used. |
HTTP_HOST | The value of the HTTP host header. |
HTTP_METHOD | HTTP request method. |
HTTP_REQUEST_CONTENT_LENGTH | The size of the request payload body in bytes. |
HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED | The size of the uncompressed request payload body after transport decoding. |
HTTP_RESPONSE_CONTENT_LENGTH | The size of the response payload body in bytes. |
HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED | The size of the uncompressed response payload body after transport decoding. |
HTTP_ROUTE | The matched route (path template). |
HTTP_SCHEME | The URI scheme identifying the used protocol. |
HTTP_SERVER_NAME | The primary server name of the matched virtual host. |
HTTP_STATUS_CODE | |
HTTP_TARGET | The full request target as passed in a HTTP request line or equivalent. |
HTTP_URL | Full HTTP request URL in the form
|
HTTP_USER_AGENT | Value of the HTTP User-Agent header sent by the client. |
MESSAGING_CONVERSATION_ID | The conversation ID identifying the conversation to which the message belongs, represented as a string. |
MESSAGING_DESTINATION | The message destination name. |
MESSAGING_DESTINATION_KIND | The kind of message destination |
MESSAGING_MESSAGE_ID | A value used by the messaging system as an identifier for the message, represented as a string. |
MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES | The compressed size of the message payload in bytes. |
MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES | The (uncompressed) size of the message payload in bytes. |
MESSAGING_OPERATION | A string identifying the kind of message consumption as defined in the Operation names section above. |
MESSAGING_PROTOCOL | The name of the transport protocol. |
MESSAGING_PROTOCOL_VERSION | The version of the transport protocol. |
MESSAGING_SYSTEM | A string identifying the messaging system. |
MESSAGING_TEMP_DESTINATION | A boolean that is true if the message destination is temporary. |
MESSAGING_URL | Connection string. |
NET_HOST_IP | Like |
NET_HOST_NAME | Local hostname or similar |
NET_HOST_PORT | Like |
NET_PEER_IP | Remote address of the peer (dotted decimal for IPv4 or RFC5952 for IPv6) |
NET_PEER_NAME | Remote hostname or similar. |
NET_PEER_PORT | Remote port number. |
NET_TRANSPORT | Transport protocol used. |
PEER_SERVICE | The |
RPC_METHOD | The name of the method being called, must be equal to the $method part in the span name. |
RPC_SERVICE | The full name of the service being called, including its package name, if applicable. |
RPC_SYSTEM | A string identifying the remoting system. |