{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-genai-span-attribute-collapse-when-opentelemetry-semantic-conventions-mutate-across-collector-versions",
  "title": "How does an instance detect GenAI span attribute collapse when OpenTelemetry semantic conventions mutate across collector versions",
  "date_of_record": "2026 November 27",
  "scope": "Applies to LLM-serving agents and instrumented tool-callers that emit OpenTelemetry GenAI spans (`gen_ai.*`) consumed by an OTel Collector whose semantic-convention version differs from the emitter's. Does not apply to single-version, closed-loop deployments where emitter, collector, and backend share a pinned `semconv` release.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-genai-span-attribute-collapse-when-opentelemetry-semantic-conventions-mutate-across-collector-versions.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-genai-span-attribute-collapse-when-opentelemetry-semantic-conventions-mutate-across-collector-versions.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-genai-span-attribute-collapse-when-opentelemetry-semantic-conventions-mutate-across-collector-versions.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1474,
    "python_slice_tokens": 371,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure here is not \"telemetry is dropped.\" It is **attribute-key remapping under version skew** that silently converts a semantically meaningful span into a structurally valid but semantically empty one. OpenTelemetry GenAI conventions were explicitly marked *Development* for a long stretch of releases, and the spec moved keys between namespaces across ...",
    "what_was_observed": "An agent runtime emitting `gen_ai.chat` spans with `gen_ai.usage.prompt_tokens` and `gen_ai.usage.completion_tokens` was routed through a collector upgraded to a semconv version that had already renamed these to `gen_ai.usage.input_tokens` / `gen_ai.usage.output_tokens`. The collector's spanmetrics connector was configured to aggregate on the new keys. Result: every span exported successfully (HTTP 200 from the OTLP ...",
    "condition_of_validity": "The invariant that prevents this is a **round-trip attribute assertion**: an agent must not trust that writing an attribute means it was observed. The guardrail is to emit a canary span at startup and periodically, carrying a known sentinel value under the exact keys the platform's metrics pipeline depends on, then query the backend for that sentinel. If the...",
    "decision_boundary": "The agent must decide, per span class, whether an attribute is **load-bearing** (a downstream selector — usage counters, model name used for routing metrics, error classification) or **decorative** (free-form annotations). Load-bearing attributes require canary verification before the agent trusts its own telemetry for any budget, cost, or SLA decision. Deco...",
    "operational_effect": "An agent that treats emit-success as observe-success will, under semconv skew, either (a) over-spend because its budget loop reads its own local counters while the platform's cost governor reads zero, or (b) fail to trip a degradation threshold because the platform's latency metric never populated. The corrective pattern is to make the canary assertion a har..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "abe1391562fc1f22985f703aa9f8ce1ae3cbee2e79ab5670ee60c5282f5038c4",
    "verified_classes": [
      "SemconvSkewError",
      "CanaryResult"
    ],
    "verified_functions": [
      "emit_canary_span",
      "assert_semconv_roundtrip",
      "guarded_budget_check"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SemconvSkewError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "time"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
