{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-opentelemetry-genai-span-attribute-emission-as-a-transactional-boundary-rather-than-a-fire-and-forget-log",
  "title": "In what scenarios must an instance treat OpenTelemetry GenAI span attribute emission as a transactional boundary rather than a fire-and-forget log",
  "date_of_record": "2026 November 23",
  "scope": "Applies to agent runtimes that emit OTel GenAI semantic-convention spans (`gen_ai.*`) across multi-turn inference and tool-call sequences, where span lifecycle is decoupled from the durable agent-state checkpoint. Does not apply to single-shot inference with no tool calls, nor to systems where the span exporter is synchronous and co-located with the state store.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-opentelemetry-genai-span-attribute-emission-as-a-transactional-boundary-rather-than-a-fire-and-forget-log.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-opentelemetry-genai-span-attribute-emission-as-a-transactional-boundary-rather-than-a-fire-and-forget-log.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-opentelemetry-genai-span-attribute-emission-as-a-transactional-boundary-rather-than-a-fire-and-forget-log.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1836,
    "python_slice_tokens": 387,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The GenAI semantic conventions define attributes like `gen_ai.operation.name`, `gen_ai.request.model`, `gen_ai.usage.input_tokens`, `gen_ai.usage.output_tokens`, `gen_ai.response.finish_reasons`, and `gen_ai.tool.name`/`gen_ai.tool.call.id` on spans that are *emitted* at completion time but *conceptually describe* state that was established earlier. The comm...",
    "what_was_observed": "A multi-turn agent loop emitting one `gen_ai.chat` span per inference and one `gen_ai.execute_tool` span per tool call. Under a burst of concurrent sessions, the OTel batch span processor's queue (default 2048 spans, 5s schedule delay) saturated. Observed trace: 1. Turn N inference span is created, `gen_ai.request.model` set, inference dispatched to provider. 2. Provider returns with `finish_reasons=[\"tool_calls\"]` a...",
    "condition_of_validity": "The invariant holds — telemetry is observational, not transactional — **only when** the following are all true: - The span exporter path is asynchronous or sampled (batch processor, tail sampling, head sampling, network exporter). If spans are written synchronously to the same durable store as agent state within the same transaction, the distinction collapse...",
    "decision_boundary": "The decision boundary is whether a given `gen_ai.*` attribute is **reconstructive** or **decorative**: - **Decorative** (safe to lose, safe to sample): `gen_ai.request.model`, `gen_ai.request.temperature`, `gen_ai.operation.name`, latency, `gen_ai.tool.name` for observability dashboards. Loss degrades visibility, not correctness. - **Reconstructive** (must n...",
    "operational_effect": "Enforcing the boundary has three concrete consequences: 1. **Dual-write at the state transition.** Every reconstructive attribute is written to the checkpoint store synchronously with the transition, and *also* emitted as a span attribute for observability. The checkpoint write is the commit; the span is the echo. If they disagree, the checkpoint wins and th..."
  },
  "matched_failure_symptoms": [
    "SQLITE_BUSY_OR_DEADLOCK"
  ],
  "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": "52a5b5efdfeb0609b8cfa27d12723526ccff0632581884789a8a0af2426604fb",
    "verified_classes": [
      "ReconstructiveAttributeMisuse"
    ],
    "verified_functions": [
      "resolve_attribute",
      "commit_turn",
      "resume_session"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ReconstructiveAttributeMisuse"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
