OpenTelemetry Semantic Conventions: A Guide for Instrumentation
Learn how OpenTelemetry semantic conventions name your telemetry, which ones are stable, how to migrate safely, and what the GenAI conventions add.

By: Mike Goldsmith

Key Takeaways
- Semantic conventions give every service the same names for the same things, which is what makes cross-service queries possible.
- Set resource attributes such as
service.namebefore anything else. - Check a convention's stability level before you build alerts or SLOs on it.
- The GenAI conventions are usable today but still in development, so pin your instrumentation versions.
Three services record the same HTTP status as http.status_code, status, and response_code. No single query covers all three, so the error rate across your system becomes a guess. OpenTelemetry semantic conventions solve this by giving each concept one name, so a single query covers every service. This guide covers what to set first, which conventions are stable, how to migrate safely when names change, and what the GenAI conventions add for AI workloads.
What are OpenTelemetry semantic conventions?
Semantic conventions (often called OTel semconv) are the standard names, types, and meanings for the attributes on traces, metrics, logs, and resources. http.response.status_code always holds the HTTP status as an integer, whatever language or framework produced it. http.request.method always holds a method such as GET or POST, and anything unrecognized is recorded as _OTHER.
Instrumentation libraries, the Collector, and backends can all rely on those names. Your telemetry also stays portable between vendors, because moving does not mean renaming attributes. A new service is queryable alongside the others from its first deployment. The project publishes them as a versioned specification, and every attribute carries a stability level.
Start with resource attributes
OpenTelemetry resource attributes describe what produced the telemetry. You set them once per service, and every span, metric, and log carries them.
- Start with
service.name. If it’s missing, the SDK falls back tounknown_service:<process name>and your services will blur together. - Then, add
service.version,service.namespacefor the owning team or product area, anddeployment.environment.name.- All four are stable. They are the fields people filter and group by during an incident: which service, release, and environment.
- Add
service.instance.idas well when you need to tell replicas apart. Without these fields, you cannot separate the checkout release that shipped on Tuesday from the one before it. - Set them with
OTEL_SERVICE_NAMEandOTEL_RESOURCE_ATTRIBUTESin your deployment config, not in application code.
Use the standard span attributes for HTTP and databases
Under the OpenTelemetry semantic conventions for HTTP, the stable attributes you will query most are http.request.method, http.response.status_code, http.route, url.full, and server.address. Auto-instrumentation emits them without extra code, and your distributed tracing view can then group by route and status across every service.
Keep http.route to the route template, such as /users/{id}, not the raw path, so the values stay low-cardinality.
Database client spans are stable too. db.system.name, db.operation.name, db.collection.name, and db.namespace identify the database, the operation, and its target. Group by db.collection.name to find the slowest table across every service.
Leave these names alone. If one service renames http.response.status_code to status or copies it into a second attribute, "error rate by route for every service" stops working for that service.
Check stability before you depend on a convention
Every convention has a stability level: development (previously called experimental), release candidate, or stable. As of v1.45.0, HTTP, database client, and RPC spans are stable. Messaging and GenAI are in development. Build alerts and SLOs on stable names first.
When a convention becomes stable, its name can change. For example, http.method became http.request.method. Instrumentation libraries manage the move with OTEL_SEMCONV_STABILITY_OPT_IN. The value http emits only the stable names. The value http/dup emits old and new names together. Run duplicate mode while you update queries, dashboards, and alerts, then switch to http. Combine values with commas, as in http/dup,database/dup. Support varies by language and library, so check yours.
export OTEL_SEMCONV_STABILITY_OPT_IN=http/dupName custom attributes so they sit beside standard ones
Look in the semantic conventions registry first. Add a custom attribute only when no convention covers the concept. Custom OpenTelemetry attributes follow the standard rules: dot-delimited namespaces, lowercase snake_case, and a prefix for your company or application. Never use the reserved otel namespace, and do not start a name with an existing namespace such as http, because OpenTelemetry may define that name later.
acme.payment.retry_count sits beside http.response.status_code and cannot collide with it. For more, see our guide to naming custom attributes. Document each attribute's meaning, type, and unit so other teams can use it. To define and validate your team's own schema, use OpenTelemetry Weaver.
Look in the semantic conventions registry first. Add a custom attribute only when no convention covers the concept. Custom OpenTelemetry attributes follow the standard rules: dot-delimited namespaces, lowercase snake_case, and a prefix for your company or application. Never use the reserved otel namespace, and do not start a name with an existing namespace such as http, because OpenTelemetry may define that name later.
acme.cart.item_count sits alongside http.response.status_code and cannot collide with it. Capture what matters to your business, including why your code made a decision: acme.discount.rule_id, acme.fraud.decision_path, or the lookup value that picked a price tier. You will want these in an incident, and no convention supplies them.
Add more early. It is better to have an attribute when you need it than to wish you had it and add it retroactively. At Honeycomb, we do not price by the number of attributes or make you choose which ones to index.
See our guide to naming custom attributes, then describe each one in a custom telemetry schema, an OpenTelemetry Weaver YAML file you upload to Honeycomb. Our MCP tools and AI agents read it, so they stop guessing from attribute names.
What the GenAI semantic conventions add
The OpenTelemetry GenAI semantic conventions standardize telemetry for model calls, tool calls, and agents under the gen_ai namespace. Set these first:
gen_ai.operation.namegen_ai.provider.namegen_ai.request.modelgen_ai.usage.input_tokensgen_ai.usage.output_tokens
The operation name is chat for a model call, execute_tool for a tool call, and invoke_agent for an agent run. Name model call spans like chat gpt-4, the operation followed by the model. Token counts let you attribute cost by model and spot an agent stuck in a loop.
These conventions are in development and now live in their own repository, semantic-conventions-genai. It has not tagged a release yet, so names can still change. Adopt them now and pin your instrumentation library versions, so a rename happens when you choose. To see them in use, read about agent observability and instrumenting AI agents.
Put consistent telemetry to work
When every service uses the same names, any engineer can ask a question across the whole system without knowing how each team instrumented its code. In Honeycomb, that is one query: error rate by http.route, grouped by service.name. Honeycomb takes data over OTLP with no proprietary agent, and you can query on any attribute, standard or custom. See OpenTelemetry with Honeycomb.
Try OpenTelemetry with Honeycomb
Get started for free.


