Skip to main content
This lesson explains OpenTelemetry (OTel) schemas, why they matter, and how schema_url provides a versioned contract that helps producers and consumers evolve independently without breaking dashboards, alerts, or downstream tools. Producers are the application SDKs that generate telemetry (traces, metrics, logs) and send it downstream. Telemetry items include attributes such as http.status_code and service.name defined by OTel semantic conventions. When telemetry is emitted without a schema reference (schema_url), it’s common — but it leaves no explicit, machine-readable way to indicate how many attributes exist, when an attribute name changes, or how attributes map across versions. Over time attribute names and meanings can evolve. For example, http.status_code might be renamed to http.response.status_code to clarify that the value refers specifically to the response. Producers can include a schema_url so the data becomes self-describing and version-aware. Here is a typical span payload that includes the newer attribute name and a schema reference at the resource level:
The image illustrates schema evolution, showing the transition of http.status_code to http.response.status_code and the addition of a schema_url from an empty string to "https://opentelemetry.io/schema/1.1.0".
Originally telemetry had no schema defined. Later it referenced https://opentelemetry.io/schemas/1.1.0. Both the attribute name and the schema reference evolved, making the data self-describing and version-aware. Producers and consumers evolve at different speeds: attribute names change, new attributes are added, and old ones are renamed. Without a declared contract, dashboards and alerts can break when they expect an attribute name that no longer exists. Schemas provide that contract — they declare names and meanings so producers can evolve independently while consumers continue to read and interpret the data.
The image illustrates "Schemas as Contracts Between Producers and Consumers," showing a schema file as a contract detailing names, meaning, and structure. Producers and consumers rely on this schema to facilitate communication and compatibility.
The schema file acts as a bridge from the data producers emit to the systems that visualize or query it downstream. Consider this example payload emitted by a producer:
If a dashboard or alert still queries http.status_code, it will not find that attribute and the visualization may appear broken (greyed out). To avoid a wholesale coordinated change across many producers and consumers, introduce a schema file that declares how names changed. For example, a 1.1.0 schema might express this rename:
With such a schema, consumers or intermediaries can automatically translate between versions: map incoming attributes to the names dashboards expect, or update dashboards to understand new names. With both producers and consumers referencing the same schema, the dashboard works again without changing every producer.
Schemas decouple producers and consumers by providing a versioned contract for attribute names and meanings. This enables safe, incremental evolution of telemetry without breaking downstream systems.
If you do not adopt schemas or a mapping strategy, dashboards, alerts, and queries that rely on specific attribute names are at risk of breaking when those names change. Consider adding schema_url to your producers and validating schema-aware mappings in pipelines.
Key benefits of using OTel schemas
BenefitWhat it solvesExample
Versioned contractPrevents breaking changes when attributes are renamed or restructuredMap http.response.status_code to http.status_code via schema
Automatic translationEnables pipelines to transform attributes for legacy consumersPipeline maps new attribute names to old queries
Clear evolution historyDocuments when and why changes occurredversions section in schema YAML records renames and additions
Better interoperabilityHelps multiple teams and tools read telemetry consistentlySDKs, observability tools, and dashboards align on semantics
How to adopt schemas (practical steps)
  1. Add schema_url to your producers (SDKs or instrumentation).
  2. Publish or reference a schema file that records renames, additions, and breaking changes.
  3. Update pipelines (collectors, processors) to consult the schema and perform attribute mapping where necessary.
  4. Gradually update dashboards and consumers to use the newer attribute names; rely on schema mappings during the transition.
References and further reading Now that you understand why schemas matter, design producers and pipelines to include schema references so consumers can remain compatible as the telemetry data model evolves.

Watch Video