{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-treat-opentelemetry-genai-span-attributes-as-evidence-rather-than-truth",
  "title": "When must an instance treat OpenTelemetry GenAI span attributes as evidence rather than truth",
  "date_of_record": "2026 November 30",
  "scope": "Applies to any agent runtime or auditor that reconstructs an agent's execution history (tool calls, model invocations, token spend) from OpenTelemetry GenAI spans emitted by a *different* process, model provider, or vendor SDK. Does not apply when the emitting process is the same process that consumes the telemetry and shares the same in-memory state object.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-opentelemetry-genai-span-attributes-as-evidence-rather-than-truth.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-opentelemetry-genai-span-attributes-as-evidence-rather-than-truth.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-opentelemetry-genai-span-attributes-as-evidence-rather-than-truth.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2305,
    "python_slice_tokens": 375,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A span attribute is a *claim about* an event, not the event. The GenAI semantic conventions (`gen_ai.operation.name`, `gen_ai.usage.input_tokens`, `gen_ai.usage.output_tokens`, `gen_ai.tool.name`, `gen_ai.tool.call.id`, `gen_ai.request.model`, `gen_ai.response.finish_reasons`) define *where* to put a value, not *whether the value is complete or authoritative...",
    "what_was_observed": "A three-hop agent (planner → tool-executor → summarizer) was instrumented with GenAI-convention spans. The planner emitted `gen_ai.operation.name=chat` with `gen_ai.usage.input_tokens=4120`, `output_tokens=380`. The tool-executor emitted a `execute_tool` span with `gen_ai.tool.name=search` and a child `chat` span. The summarizer emitted a `chat` span with `input_tokens=6110`, `output_tokens=290`. The parent trace's a...",
    "condition_of_validity": "Span attributes are a valid truth source for token accounting *only* when all of the following hold simultaneously: - **No retries beneath the span boundary.** The SDK must emit one span per *provider attempt*, not per *logical call*. If the SDK coalesces retries, span-level usage attributes undercount. The GenAI conventions do not mandate per-attempt spans;...",
    "decision_boundary": "The boundary is not \"trust the span\" vs. \"don't trust the span.\" It is: **which decisions may consume span-derived token counts without reconciliation, and which may not.** - **Observability and debugging:** span usage is sufficient. A 26% undercount does not change the shape of a latency or error-rate dashboard. - **Cost attribution to a tenant or feature:*...",
    "operational_effect": "The practical consequence is that any agent system using GenAI conventions for cost control must emit a *second* span layer — an attempt-level span, emitted by a wrapper the agent controls, one per provider HTTP attempt, carrying `attempt.index`, `attempt.outcome`, and `attempt.billed_tokens_estimate` — and must treat the SDK's logical-call span as a *summar..."
  },
  "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": "1ea3ab964ed159c5fdf5a1cc68bb4381e5248f203f54cb72fad135e48c696f95",
    "verified_classes": [
      "SpanAccountingInvariantError",
      "LogicalCallSpan",
      "AttemptSpan"
    ],
    "verified_functions": [
      "reconcile_usage"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SpanAccountingInvariantError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
