20

The Telemetry Schema Is an API

Source: Observability Platform source notes, section 20, “The Telemetry Schema Is an API”

The enterprise problem and today’s slice

Enterprise problem: An unreviewed field rename can silently break dashboards, alerts, service-level objectives, automation, cost allocation, and security investigations even though the application deployment appears healthy.

Whole-course context: The incoming cost ledger identifies expensive dimensions and critical evidence; this day turns shared telemetry names, units, types, semantics, and deprecations into a versioned consumer contract.

Today’s slice: We govern service identity plus metric, log, and trace conventions, then prove compatible rollout and rejection paths.

End-of-day evidence: A schema revision, compatibility report, dual-read migration, consumer inventory, and rollback probe demonstrate that producers and consumers evolve safely.

Still unsolved: Data minimization, endpoint access, tenant isolation, and retention enforcement remain the next security-focused slice.

Customer use cases

Schema governance matters only when it protects customer decisions, so these cases connect producer changes to live operational consumers.

Use case IDActorCustomer jobSuccess outcomeDenial or recovery evidence
D20-UC-01Application ownerPublish a new service version without breaking telemetry consumersOld and new producers remain queryable through a bounded migration window and all registered consumers passAn incompatible field, type, unit, or label is rejected with named affected consumers
D20-UC-02Observability platform stewardDeprecate a telemetry field safelyUsage reaches zero, replacement evidence is complete, and removal occurs after the published deadlineA remaining consumer blocks removal and rollback restores the prior schema revision

Actor-centred user stories

“Use consistent fields” cannot define done, so each actor needs machine-checkable acceptance and an observed failure path.

Story IDUse case IDsUser storyObservable acceptance conditions
D20-US-01D20-UC-01As an application owner, I want schema compatibility checked before release, so that a healthy deployment cannot silently blind operationsContract tests cover required fields, units, types, cardinality policy, and representative dashboard, alert, and trace queries
D20-US-02D20-UC-02As a platform steward, I want deprecation based on consumer evidence, so that fields disappear only after dependants migrateRegistry shows owners and last-seen use; removal is denied while one fixture still queries the old field

End-to-end product flows

A schema document without producer and consumer gates drifts immediately. These flows begin at release actions and end with compatibility evidence.

Flow IDUse case IDsPathTriggerNumbered stepsTerminal evidence
D20-FLOW-01D20-UC-01HappyApplication owner proposes a telemetry schema revision1. Registry validates names, types, units, required attributes, and forbidden dimensions.<br>2. Fixtures emit old and new versions.<br>3. Consumer contract queries run.<br>4. Dual-read or transform compatibility is checked.<br>5. Revision is published.Actor, producer version, schema URL or revision, consumer versions, expected and observed queries, environment, timestamp, fixture hash, and run ID
D20-FLOW-02D20-UC-02DeniedSteward requests removal of a deprecated field1. Registry checks deadline and consumer inventory.<br>2. One active consumer is detected.<br>3. Removal is denied.<br>4. Replacement field remains queryable as a positive control.<br>5. Owner and migration deadline are notified.Field, remaining consumer, denial reason, replacement-query result, schema revision, timestamp, and immutable decision ID

System design derived from the flows

If compatibility logic sits only in a collector, missing business meaning cannot be recovered after ingestion. The producer owns domain semantics, while the platform owns conventions, transforms, and consumer evidence.

Use case IDEntry pointResponsible servicesAuthoritative storeFailure evidence
D20-UC-01Release telemetry-contract checkApplication instrumentation, schema registry, fixture emitter, collector compatibility layer, consumer test runnerVersioned schema registry owned by observability governanceMissing required attribute, changed type/unit, forbidden label, broken consumer query, or incompatible transform
D20-UC-02Deprecation and removal actionConsumer inventory, usage scanner, schema registry, notification serviceDeprecation registry owned by observability governanceActive consumer, deadline breach, missing replacement, or failed rollback query

Data model and ownership

An overwritten schema cannot explain an old incident or safely roll back, so revisions and consumer dependencies must be immutable and tenant-scoped. This slice creates no generated application database.

Generated-application database: Not created in this slice — telemetry schema and compatibility evidence are observability control-plane state.

Record or entityStore and ownerPrimary keyForeign key or opaque referenceTenant keyMaterial constraintLifecycle and deletionUse case IDs
TelemetrySchemaRevisionSchema registry, observability governance ownerschema_revision_idNone — immutable root revision in a schema familyorganization_idPublished revisions are immutable; field name, type, unit, meaning, allowed dimensions, and compatibility mode are requiredDraft, publish, deprecate, retain permanently for interpretation, never mutate in placeD20-UC-01, D20-UC-02
ConsumerContractConsumer registry, owning product teamconsumer_contract_idschema_revision_id local FK or schema-family opaque referenceorganization_idOwner, query fixtures, required fields, and last passing run are mandatoryRegister, revise, deactivate after usage reaches zero, retain audit metadataD20-UC-01, D20-UC-02
CompatibilityRunEvidence store, release engineering ownerrun_idOpaque producer build, schema revision, and consumer fixture referencesorganization_idInput fixture hash and expected/observed results are immutableRetain through deprecation window plus audit period; expire bulky payloads separatelyD20-UC-01, D20-UC-02

The schema contract

Shared identity breaks correlation when each signal uses a different service or environment name. Define canonical resource identity once and state signal-specific constraints separately.

Contract areaRequired decisions
Shared identityservice.name, service.namespace, service.version, deployment.environment.name, region, cluster, owner, and tenant semantics
MetricsStable name and meaning, base unit, type, required and forbidden labels, histogram boundaries, owner, and deprecation policy
LogsTimestamp, severity, event name, service identity, trace reference, error type, schema version, structured fields, and sensitive-data classification
TracesSpan naming, resource attributes, parent/context propagation, status/error semantics, business attributes, sampling, and sensitive-attribute classification

The schema is an API because dashboards, alerts, capacity models, service-level objective calculations, incident automation, cost allocation, deployment analysis, and security tools depend on it. OpenTelemetry’s stable schema specification exists precisely because source and consumer assumptions otherwise change together; a schema URL can identify an immutable version and describe supported transformations. It does not replace an organization’s complete field and value contract.

Infrastructure can capture mechanics such as HTTP status or CPU time. Only application code can state that a checkout failed, a policy was rejected, a model response was unsafe, a tenant boundary was violated, or a payment was duplicated. A collector may validate, redact, enrich, or perform a documented lossless transform; it must not invent that missing meaning.

Compatibility and falsification protocol

Happy-path fixtures miss silent consumer breakage, so test old/new producers against real query shapes and a deliberately incompatible change.

  1. Inventory dashboards, alerts, SLO rules, cost jobs, security queries, and automation with owners.
  2. Freeze old and new producer fixtures plus consumer query fixtures.
  3. Validate identity, field presence, type, unit, histogram boundaries, and cardinality policy.
  4. Run consumers against old, dual-emitted or transformed, and new telemetry.
  5. Attempt a breaking rename without migration; require the gate to deny it and name every affected consumer.
  6. Prove an unaffected field and replacement query still work.
  7. Remove the old field only after usage is zero for the published window; falsify readiness if any live consumer or unexplained query remains.

Key takeaways

Telemetry is production-facing interface state even when customers never see its field names directly.

  • Shared identity makes metrics, logs, traces, profiles, deployments, and owners correlatable.
  • Producers own business meaning; collectors cannot invent semantics.
  • Published revisions are immutable and deprecations are evidence-driven.
  • Compatibility requires consumer fixtures, negative tests, a migration window, and rollback.

Checklist

A schema change is ready only when both producers and consumers can prove their expectations.

  • [ ] Every field has meaning, type, unit, owner, and cardinality or sensitivity policy.
  • [ ] Canonical service identity is consistent across signals.
  • [ ] Consumer inventory includes dashboards, alerts, SLOs, cost, security, and automation.
  • [ ] A deliberately breaking fixture is denied with affected owners.
  • [ ] Deprecation has replacement, deadline, zero-use evidence, and rollback.

Sources

Schema mechanics and naming conventions evolve, so current statements were checked against official specifications and documentation.