2.1 OpenTelemetry Semantic Conventions & Namespaces

Key Takeaways

  • Semantic Conventions define a shared vendor-neutral taxonomy of attribute names and types across all telemetry signals

  • The HTTP semantic conventions (stable since v1.23.0) replaced legacy keys like http.method and http.status_code with http.request.method, http.response.status_code, and url.full

  • Stable database conventions (v1.33.0) rename db.statement to db.query.text; non-parameterized query text should not be captured by default unless its literal values are sanitized

  • Semantic conventions move through stability levels: Development conventions may change with breaking renames, whereas Stable conventions guarantee backwards compatibility

  • Consistent semantic naming enables uniform Grafana/APM dashboards, generic alerting rules, and automated root cause analysis across heterogeneous polyglot architectures

Last updated: September 2026

OpenTelemetry Semantic Conventions & Namespaces

In modern distributed cloud-native systems, telemetry data is generated across dozens of microservices written in different programming languages—such as Go, Java, Python, TypeScript, and Rust. Without an overarching standard, individual software teams inevitably invent conflicting names for identical runtime concepts: one service records http_status=200, another reports statusCode=200, a third logs response_code="200", and a fourth uses HTTP.STATUS: 200.

This lack of uniformity creates a telemetry "Tower of Babel". Observability backends cannot correlate requests across service boundaries, engineers must write dozens of custom dashboard queries for every language runtime, and generic alerting rules across an entire fleet become impossible to maintain.

OpenTelemetry Semantic Conventions solve this problem by establishing a rigorous, standardized, vendor-neutral naming schema and attribute vocabulary for all telemetry data types (spans, metrics, logs, and resource entities). Maintained by the OpenTelemetry project (a CNCF project) in its semantic-conventions repository, Semantic Conventions ensure that whether a request originates in an ASP.NET service, transits a Go gateway, or queries a PostgreSQL database via Python, every observation describes identical semantics with identical keys and data types.


Why Semantic Conventions Are Essential

Adopting OpenTelemetry Semantic Conventions delivers four foundational operational advantages for site reliability engineers and developers:

  1. Uniform Dashboards and Visualization: A single pre-built dashboard can display golden signals (rate, errors, duration) across 500 microservices without requiring custom per-service query logic or field rewriting.
  2. Cross-Service Contextual Correlation: Standardized networking and remote procedure keys (such as server.address, server.port, client.address, and network.peer.address) enable APM tools and service meshes to infer system topology and render dynamic distributed service dependency maps automatically.
  3. Generic Alerting Rules: Platform teams can author a single alerting rule—such as triggering a P1 notification whenever http.response.status_code >= 500 exceeds a 1% threshold over a 5-minute sliding window—that instantly evaluates telemetry across all services in an organization.
  4. Automated Root Cause Analysis (AIOps and Anomaly Detection): Automated root cause engines parse structured attributes to isolate failing dependencies (for example, pinpointing an exhausted database connection pool via db.client.connection.count split by db.client.connection.state, or distinguishing downstream timeout anomalies via error.type).

Core Semantic Convention Namespaces

OpenTelemetry organizes attribute keys into a hierarchical dot-notated taxonomy (namespace.subsystem.attribute). Understanding these core namespaces is essential for candidates preparing for the OpenTelemetry Certified Associate examination.

1. HTTP Namespace (The Modernized Standard)

The HTTP renames arrived in semantic conventions v1.21.0 (July 2023), and the HTTP conventions were declared stable in v1.23.0 (November 2023). You will meet both the stable names and the legacy names in real data, so learn the mapping:

Modern Stabilized AttributeLegacy (Deprecated) AttributeTypeDescription & Example
http.request.methodhttp.methodstringHTTP request method normalized to uppercase: "GET", "POST", "PUT", "DELETE". Non-standard methods use "_OTHER".
http.response.status_codehttp.status_codeintNumerical HTTP response status code: 200, 404, 500.
url.fullhttp.urlstringFull absolute URL for client spans: "https://api.example.com/v1/orders?item=42".
url.pathhttp.targetstringPath component for HTTP requests: "/v1/orders".
url.queryhttp.target (query part)stringThe URI query component: "item=42". Instrumentations should redact sensitive query values.
http.routehttp.routestringThe parameterized route template for server spans: "/users/:userId" or "/orders/{orderId}". Prevents metric cardinality explosions.
server.addressnet.peer.name (client side) / net.host.name (server side)stringServer domain or IP address: "api.example.com".
server.portnet.peer.port (client side) / net.host.port (server side)intServer port number: 443, 8080.
client.addresshttp.client_ipstringClient address as reported by the server (it may come from a forwarding header): "192.168.1.100".
network.protocol.versionhttp.flavorstringNetwork protocol version: "1.1", "2", "3".

Exam Tip: On server spans, never put raw paths that contain IDs (such as /users/123849) into http.route or metric attribute dimensions! Storing arbitrary IDs creates high-cardinality unbounded sets that degrade metric database performance. Always record the route template "/users/:id" in http.route.

2. Database Namespace (db.*)

Database spans represent outbound client calls from an application to a persistent datastore, cache, or search engine. The core database conventions became stable in semantic conventions v1.33.0 (2025) and renamed most of the older keys:

Stable attributeLegacy attributeExample
db.system.namedb.system"postgresql", "mysql", "redis", "mongodb"
db.namespacedb.name"production_users"
db.query.textdb.statement"SELECT customer_id, balance FROM accounts WHERE account_id = ?"
db.operation.namedb.operation"SELECT", "INSERT", "HMSET"
db.collection.namedb.sql.table and similar"accounts"
db.query.summary(new)"SELECT accounts", a low-cardinality summary suitable for span names

The old db.user attribute is not part of the stable set.

Query Text and Sanitization

Production queries often contain personally identifiable information (PII) or secrets. The stable conventions handle this with SHOULD-level rules rather than a blanket ban:

  • Non-parameterized query text SHOULD NOT be collected by default unless the instrumentation sanitizes it (for example, by replacing every literal value with ?).
  • Parameterized query text (with placeholders such as ?, $1, or :val) SHOULD be collected by default, because the sensitive values travel separately as parameters.
  • The parameter values themselves are opt-in, through db.query.parameter.<key>.

3. RPC & gRPC Namespace (rpc.*)

Remote Procedure Call conventions apply to structured protocol systems such as gRPC, Apache Dubbo, and Connect RPC. They reached Release Candidate status in semantic conventions v1.44.0 (August 2026) after several renames, so expect both forms in the field:

Current attributeLegacy attribute(s)Example
rpc.system.namerpc.system"grpc", "dubbo", "connectrpc"
rpc.method (fully qualified)rpc.service + rpc.method"orders.v1.OrderService/SubmitOrder"
rpc.status_code (string)rpc.grpc.status_code (integer)"OK", "DEADLINE_EXCEEDED", "UNAVAILABLE" (legacy integers 0, 4, 14)

For gRPC, every status code other than OK should be treated as an error.

4. Cloud & Infrastructure Namespace (cloud.* & host.*)

Infrastructure attributes capture where an application runtime or container is hosted:

  • cloud.provider: Cloud platform identifier: "aws", "gcp", "azure", "alibaba_cloud".
  • cloud.platform: Specific compute platform: "aws_ec2", "aws_ecs", "gcp_compute_engine", "azure.vm" (the Azure values now use dots).
  • cloud.region: Logical cloud data center region: "us-east-1", "europe-west3".
  • cloud.account.id: Account or tenant ID: "123456789012".
  • host.id: Unique machine identifier (e.g., AWS EC2 instance ID "i-0a8b9c1d2e3f").
  • host.name: The hostname or FQDN: "worker-node-04.prod.internal".

5. Container & Kubernetes Namespace (container.* & k8s.*)

Containerized workloads in Kubernetes clusters utilize standardized entity coordinates:

  • k8s.cluster.name: Name of the Kubernetes cluster: "prod-useast-eks".
  • k8s.namespace.name: Kubernetes namespace: "payments-prod".
  • k8s.pod.name: Specific pod replica name: "payment-processor-78db6c49bc-h9z4m".
  • k8s.pod.uid: Unique UUID assigned to the pod by the Kubernetes API server.
  • k8s.container.name: Specific container within the pod: "payment-worker".
  • k8s.deployment.name: High-level deployment workload name: "payment-processor".
  • container.id: The container ID assigned by the runtime, without any docker:// or containerd:// prefix: "a3bf90e006b2".

Stability Guarantees and Schema Evolution

Semantic conventions are published as part of the OpenTelemetry specification repository and evolve through formalized stability levels:

[ Development ] ---> [ Release Candidate ] ---> [ Stable ]
        (any convention can later be marked Deprecated)
  1. Development (older documents call it Experimental): Conventions under active design. Keys may be renamed or replaced in a later release without backwards-compatibility guarantees.
  2. Release Candidate: The design is expected to become stable; only limited changes are still possible.
  3. Stable: Stable attributes guarantee backwards compatibility. An attribute's name, type, and meaning cannot change; a stable attribute that is superseded is deprecated rather than silently removed.
  4. Deprecated: When an attribute is superseded (e.g., http.method replaced by http.request.method), it is marked deprecated with a pointer to its replacement. During the HTTP migration, instrumentations offered OTEL_SEMCONV_STABILITY_OPT_IN=http/dup to emit old and new names side by side, and http to emit only the new names.
  5. Schema URLs (schema_url): Telemetry payloads include an explicit schema URL (such as https://opentelemetry.io/schemas/1.24.0) that documents which version of the semantic conventions was used when the data was produced. Observability collectors and backends can parse this schema URL to map legacy attributes to modern conventions automatically.

Top 15 Most Tested Semantic Convention Attributes

Review this reference table of 15 attributes you will meet constantly in real telemetry:

#Attribute KeyTarget NamespaceCanonical TypeExample Value
1http.request.methodHTTPstring"POST"
2http.response.status_codeHTTPint200
3http.routeHTTPstring"/api/v2/items/{id}"
4url.fullURL / HTTPstring"https://api.shop.com/checkout"
5server.addressServer / Networkstring"auth.internal.net"
6server.portServer / Networkint8443
7db.system.nameDatabasestring"postgresql"
8db.namespaceDatabasestring"orders_db"
9db.query.textDatabasestring"SELECT * FROM orders WHERE id = ?"
10db.operation.nameDatabasestring"SELECT"
11rpc.system.nameRPCstring"grpc"
12rpc.methodRPCstring"inventory.v1.WarehouseService/CheckStock"
13error.typeGeneralstring"timeout", "500"
14rpc.status_codeRPCstring"UNAVAILABLE"
15k8s.pod.nameKubernetesstring"auth-service-5c678-8v2w1"
Loading diagram...
OpenTelemetry Semantic Conventions Namespace Taxonomy
Test Your Knowledge

A team is updating its HTTP client tracing attributes to follow the stable OpenTelemetry HTTP semantic conventions. Which pair of attribute keys are the stable replacements for the legacy http.method and http.status_code?

A

http.method and http.status_code

B

http.request.method and http.response.status_code

C

http.req.verb and http.res.code

D

http.action and http.status

Test Your Knowledge

During a compliance review, an auditor finds database spans whose query text (db.query.text, formerly db.statement) contains literal customer values such as email addresses. What do the stable database semantic conventions say about capturing query text?

A

Instrumentations must omit db.system.name whenever a query contains sensitive values

B

Query text must be encrypted with a public key before it is stored on the span

C

Non-parameterized query text should not be collected by default unless its literal values are sanitized, while parameterized query text may be collected because the values travel as separate parameters

D

The conventions forbid recording any query text on database spans

Test Your Knowledge

An order service makes a gRPC call to inventory.v1.InventoryService/CheckStock, and the call fails because the remote service is unreachable (gRPC status UNAVAILABLE). Which attribute set follows the current RPC semantic conventions for the client span?

A

rpc.type="grpc", rpc.package="inventory.v1", rpc.call="CheckStock", rpc.error="UNAVAILABLE"

B

grpc.service="CheckStock", grpc.method="inventory.v1", grpc.code=14

C

service.name="inventory.v1", span.kind="CLIENT", http.status_code=503

D

rpc.system.name="grpc", rpc.method="inventory.v1.InventoryService/CheckStock", rpc.status_code="UNAVAILABLE"

Sections you finish are checked off in the contents.