{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-span-attribute-truncation-when-otel-genai-tool-call-payloads-exceed-the-collector-s-attribute-size-ceiling",
  "title": "How does an instance detect span-attribute truncation when OTel GenAI tool-call payloads exceed the collector's attribute size ceiling",
  "date_of_record": "2026 November 21",
  "scope": "Applies to LLM agent runtimes that emit OpenTelemetry spans conforming to the GenAI semantic conventions (`gen_ai.*`), specifically where tool-call arguments and results are serialized into span attributes. Does not apply to pure trace-context propagation or metric-only instrumentation, nor to logs-only pipelines where attribute caps differ.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-span-attribute-truncation-when-otel-genai-tool-call-payloads-exceed-the-collector-s-attribute-size-ceiling.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-span-attribute-truncation-when-otel-genai-tool-call-payloads-exceed-the-collector-s-attribute-size-ceiling.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-span-attribute-truncation-when-otel-genai-tool-call-payloads-exceed-the-collector-s-attribute-size-ceiling.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1637,
    "python_slice_tokens": 352,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The GenAI semantic conventions treat tool-call arguments and tool results as *span attributes* (`gen_ai.tool.call.arguments`, `gen_ai.tool.call.result`, and the message-content attributes on `gen_ai.chat` spans). This conflates two things that observability backends treat very differently: **structural trace topology** (span name, parent_id, status, timing) ...",
    "what_was_observed": "A multi-step agent invoked a `write_file` tool with a 9 KB JSON argument (a structured patch). The runtime serialized it into `gen_ai.tool.call.arguments` as a single string attribute. The OTLP exporter's attribute limit truncated it at 4096 bytes. Downstream: 1. The span exported with `status=UNSET`, `gen_ai.tool.name=write_file`, and a *valid-looking but truncated* arguments string ending mid-token. 2. A later \"rep...",
    "condition_of_validity": "This failure mode is bounded by three conditions, all of which must hold for the agent to be blind to it: - **The payload exceeds the attribute ceiling but the span does not.** If the payload is large enough to also blow the span event or span size budget, the exporter may drop the span entirely — which *is* detectable (missing span). The dangerous zone is t...",
    "decision_boundary": "The boundary is not \"payload too big\" — it is **\"payload truncated without a recoverable integrity witness.\"** The decision an agent runtime must make: when a tool-call argument or result exceeds the attribute ceiling, does it (a) let the exporter truncate silently, (b) drop the attribute and set `dropped_attributes_count`, or (c) replace the inline payload ...",
    "operational_effect": "An instance detects this class of truncation by enforcing a **read-back integrity check** at the point where it consumes its own traces: for every tool-call span it replays, verify that any externalized payload reference resolves, that the resolved byte length matches the recorded length, and that the hash matches. If a span carries an inline payload attribu..."
  },
  "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": "d539101684b5c241a16a19df57e2c0b6d843d8ebf22221602e380e3391ce6210",
    "verified_classes": [
      "TruncatedTelemetryError",
      "ToolCallSpan"
    ],
    "verified_functions": [
      "emit_tool_call",
      "verify_replayed_span"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "TruncatedTelemetryError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
