OpenTelemetry semantic attributes convention

What are semantic attributes?

OpenTelemetry semantic attribute conventions are standardized naming and value specifications for telemetry data attributes across traces, metrics, and logs. These conventions ensure consistency and interoperability when instrumenting applications and services.

Attributes use dot-notation namespacing (e.g., http.method, db.connection_string) and follow consistent naming patterns. The conventions specify not only attribute names but also their expected values, data types, and appropriate usage contexts.

To maintain compatibility with other tools like Prometheus and Tempo, Uptrace replaces dots with underscores in attribute names. For example, service.name becomes service_name.

Evolution

The semantic conventions are actively maintained and versioned separately from the OpenTelemetry specification. They continue to expand to cover new technologies, protocols, and use cases while maintaining backward compatibility where possible.

To simplify migration between different versions, Uptrace allows you to select your desired semantic convention version on the Project Settings page. Once selected, Uptrace automatically renames certain attributes to follow the chosen convention. For example, it will rename deployment_environment to deployment_environment_name.

Uptrace does not modify existing rules to avoid breaking current queries, but we welcome suggestions for changes to include in the next supported version.

v1.33.0

Normalized attr nameCandidates
deployment_environment_namedeployment_environment, environment, env
service_nameservice, appname, application_name, fly_app_name
host_namehostname, host_hostname, host
db_namespacedb_name, db_cassandra_keyspace, db_hbase_namespace, dbname
db_system_namedb_system, db_type, db_dbms
db_collection_namedb_sql_table
db_operation_namedb_operation
db_query_textdb_statement
http_request_methodhttp_method, request_method, method
http_routehttp_server_route, route
log_severityseverity, error_severity, log_level, level
log_sourcesource_type, facility
log_file_pathlog_filepath, log_file
code_function_namecode_function
code_file_pathcode_filepath
code_line_numbercode_lineno
process_pidprocid, pid
server_addressnet_host_name, http_server_name, http_host
client_addresshttp_client_ip, net_peer_name, ip
messaging_message_idmessage_id, msgid
grouping_fingerprintlog_fingerprint, exception_fingerprint

v1.25.0

Normalized attr nameCandidates
deployment_environmentdeployment_environment_name, environment, env
service_nameservice, appname, application_name, fly_app_name
host_namehostname, host_hostname, host
enduser_iduser_id, user_identifier, user
db_namedb_cassandra_keyspace, db_hbase_namespace, dbname
db_systemdb_type, db_dbms
http_request_methodhttp_method, request_method, method
http_routehttp_server_route, route
http_response_status_codehttp_status_code
http_request_body_sizehttp_request_content_length
http_response_body_sizehttp_response_content_length
log_severityseverity, error_severity, log_level, level
log_sourcesource_type, facility
log_file_pathlog_filepath, log_file
cloud_regionfly_region
cloud_resource_idfaas_id
cloud_availability_zonecloud_zone
process_pidprocid, pid
url_schemehttp_scheme
url_fullhttp_url
url_pathhttp_target, request
faas_invocation_idfaas_execution
user_agent_originalhttp_user_agent, browser_user_agent, user_agent
network_protocol_namenet_app_protocol_name, messaging_protocol, http_flavor
network_protocol_versionnet_app_protocol_version, messaging_protocol_version
network_transportnet_transport
server_addressnet_host_name, http_server_name, http_host
server_portnet_host_port
server_socket_domainnet_sock_peer_name
server_socket_addressnet_host_ip, net_sock_host_addr
server_socket_portnet_host_port, net_sock_host_port
client_addresshttp_client_ip, net_peer_name, ip
client_socket_addressnet_peer_ip, net_sock_peer_addr
client_socket_portnet_peer_port, net_sock_peer_port
messaging_destination_namemessaging_destination
messaging_destination_kindmessaging_destination_kind
messaging_message_idmessage_id, msgid
messaging_message_typemessage_type
messaging_message_payload_size_bytesmessage_uncompressed_size
grouping_fingerprintlog_fingerprint, exception_fingerprint

Indexed attributes

To store data, Uptrace uses ClickHouse, a columnar database that stores data in columns rather than rows. This means that instead of storing all data for a single record together, each column is stored separately.

To improve query performance, Uptrace places some attributes into separate columns. However, Uptrace cannot place all attributes into separate columns because it doesn't know the complete list of attributes in advance, and this list can become very large with thousands of attributes.

AttributeSpansLogsEventsPreaggregated
deployment_environmentYesYesYesYes
service_namespaceYesYesYesYes
service_nameYesYesYesYes
service_versionYesYesYesYes
host_nameYesYesYesYes
telemetry_sdk_nameYesYes
telemetry_sdk_languageYesYes
telemetry_sdk_versionYesYes
telemetry_auto_versionYesYes
otel_library_nameYesYesYes
otel_library_versionYesYesYes
client_addressYes
client_socket_addressYes
client_socket_portYes
db_systemYes
db_nameYes
db_sql_tableYes
db_statementYes
db_operationYes
process_pidYesYes
process_commandYesYes
process_runtime_nameYesYes
process_runtime_versionYesYes
process_runtime_descriptionYesYes
log_severityYes
log_file_pathYes
log_file_nameYes
log_iostreamYes
log_sourceYes
exception_typeYes
exception_messageYes
messaging_message_idYes
messaging_message_typeYes
messaging_message_payload_size_bytesYes