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 name | Candidates |
---|---|
deployment_environment_name | deployment_environment, environment, env |
service_name | service, appname, application_name, fly_app_name |
host_name | hostname, host_hostname, host |
db_namespace | db_name, db_cassandra_keyspace, db_hbase_namespace, dbname |
db_system_name | db_system, db_type, db_dbms |
db_collection_name | db_sql_table |
db_operation_name | db_operation |
db_query_text | db_statement |
http_request_method | http_method, request_method, method |
http_route | http_server_route, route |
log_severity | severity, error_severity, log_level, level |
log_source | source_type, facility |
log_file_path | log_filepath, log_file |
code_function_name | code_function |
code_file_path | code_filepath |
code_line_number | code_lineno |
process_pid | procid, pid |
server_address | net_host_name, http_server_name, http_host |
client_address | http_client_ip, net_peer_name, ip |
messaging_message_id | message_id, msgid |
grouping_fingerprint | log_fingerprint, exception_fingerprint |
v1.25.0
Normalized attr name | Candidates |
---|---|
deployment_environment | deployment_environment_name, environment, env |
service_name | service, appname, application_name, fly_app_name |
host_name | hostname, host_hostname, host |
enduser_id | user_id, user_identifier, user |
db_name | db_cassandra_keyspace, db_hbase_namespace, dbname |
db_system | db_type, db_dbms |
http_request_method | http_method, request_method, method |
http_route | http_server_route, route |
http_response_status_code | http_status_code |
http_request_body_size | http_request_content_length |
http_response_body_size | http_response_content_length |
log_severity | severity, error_severity, log_level, level |
log_source | source_type, facility |
log_file_path | log_filepath, log_file |
cloud_region | fly_region |
cloud_resource_id | faas_id |
cloud_availability_zone | cloud_zone |
process_pid | procid, pid |
url_scheme | http_scheme |
url_full | http_url |
url_path | http_target, request |
faas_invocation_id | faas_execution |
user_agent_original | http_user_agent, browser_user_agent, user_agent |
network_protocol_name | net_app_protocol_name, messaging_protocol, http_flavor |
network_protocol_version | net_app_protocol_version, messaging_protocol_version |
network_transport | net_transport |
server_address | net_host_name, http_server_name, http_host |
server_port | net_host_port |
server_socket_domain | net_sock_peer_name |
server_socket_address | net_host_ip, net_sock_host_addr |
server_socket_port | net_host_port, net_sock_host_port |
client_address | http_client_ip, net_peer_name, ip |
client_socket_address | net_peer_ip, net_sock_peer_addr |
client_socket_port | net_peer_port, net_sock_peer_port |
messaging_destination_name | messaging_destination |
messaging_destination_kind | messaging_destination_kind |
messaging_message_id | message_id, msgid |
messaging_message_type | message_type |
messaging_message_payload_size_bytes | message_uncompressed_size |
grouping_fingerprint | log_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.
Attribute | Spans | Logs | Events | Preaggregated |
---|---|---|---|---|
deployment_environment | Yes | Yes | Yes | Yes |
service_namespace | Yes | Yes | Yes | Yes |
service_name | Yes | Yes | Yes | Yes |
service_version | Yes | Yes | Yes | Yes |
host_name | Yes | Yes | Yes | Yes |
telemetry_sdk_name | Yes | Yes | ||
telemetry_sdk_language | Yes | Yes | ||
telemetry_sdk_version | Yes | Yes | ||
telemetry_auto_version | Yes | Yes | ||
otel_library_name | Yes | Yes | Yes | |
otel_library_version | Yes | Yes | Yes | |
client_address | Yes | |||
client_socket_address | Yes | |||
client_socket_port | Yes | |||
db_system | Yes | |||
db_name | Yes | |||
db_sql_table | Yes | |||
db_statement | Yes | |||
db_operation | Yes | |||
process_pid | Yes | Yes | ||
process_command | Yes | Yes | ||
process_runtime_name | Yes | Yes | ||
process_runtime_version | Yes | Yes | ||
process_runtime_description | Yes | Yes | ||
log_severity | Yes | |||
log_file_path | Yes | |||
log_file_name | Yes | |||
log_iostream | Yes | |||
log_source | Yes | |||
exception_type | Yes | |||
exception_message | Yes | |||
messaging_message_id | Yes | |||
messaging_message_type | Yes | |||
messaging_message_payload_size_bytes | Yes |