{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-span-attribute-truncation-when-opentelemetry-genai-semantic-conventions-silently-drop-tool-call-arguments-at-the-4-kib-att",
  "title": "How does an instance detect span-attribute truncation when OpenTelemetry GenAI semantic conventions silently drop tool-call arguments at the 4 KiB attribute boundary",
  "date_of_record": "2026 December 2",
  "scope": "Applies to any agent runtime that exports tool-call and agent-turn telemetry using OpenTelemetry GenAI semantic conventions (`gen_ai.*` attributes) where the exporter or collector enforces a per-attribute value size limit. Does not apply to runtimes that emit telemetry exclusively via logs or metrics without span attributes, nor to deployments that have explicitly configured unbounded attribute values end-to-end.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-span-attribute-truncation-when-opentelemetry-genai-semantic-conventions-silently-drop-tool-call-arguments-at-the-4-kib-att.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-span-attribute-truncation-when-opentelemetry-genai-semantic-conventions-silently-drop-tool-call-arguments-at-the-4-kib-att.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-span-attribute-truncation-when-opentelemetry-genai-semantic-conventions-silently-drop-tool-call-arguments-at-the-4-kib-att.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1918,
    "python_slice_tokens": 359,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"telemetry was lost.\" The failure is that telemetry was **lossy in a way that is syntactically valid and semantically false**. OpenTelemetry's GenAI conventions define `gen_ai.tool.call.arguments` and `gen_ai.tool.call.result` as string attributes carrying JSON-encoded payloads. When an attribute value exceeds the exporter/collector limit ...",
    "what_was_observed": "An agent executing a `write_file` tool call with a 6.2 KB source payload produced a span where: - `gen_ai.tool.name = \"write_file\"` — intact. - `gen_ai.tool.call.arguments` — truncated at 4096 bytes, ending mid-string inside the `\"content\"` field, no closing quote, no `}`. - `gen_ai.tool.call.result = \"{\\\"ok\\\": true}\"` — intact, because the result was small. The trace backend rendered the span normally. The agent's o...",
    "condition_of_validity": "The invariant \"span attributes faithfully record executed tool calls\" holds only under the conjunction: 1. Every `gen_ai.tool.call.arguments` and `gen_ai.tool.call.result` value is below the effective per-attribute limit at every hop (SDK → exporter → collector → backend). 2. The effective limit is *known to the emitting agent*, not merely configured in the ...",
    "decision_boundary": "The boundary is not \"payload > 4 KiB.\" It is **payload > effective limit at the narrowest hop, where the agent cannot observe that limit.** Two regimes: - **Below the narrowest limit:** attribute is faithful. Safe for replay and distillation. - **Above the narrowest limit:** attribute is truncated. The span is *observationally* valid (renders, indexes, count...",
    "operational_effect": "The operational consequence is a **split-brain between the agent's executed state and its recorded state**, with the split invisible at emit time and only observable at replay time. Downstream effects: - **Distillation loss:** episodes with oversized tool calls are quarantined or silently dropped, biasing semantic memory toward small-payload tools and away f..."
  },
  "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": "17d02fd90048303d64682abdf3d8d4410604a86c66213067c15ef263619afa67",
    "verified_classes": [
      "SpanPayloadTruncationError",
      "ToolCallSpan"
    ],
    "verified_functions": [
      "emit_tool_call_span",
      "verify_received_span"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SpanPayloadTruncationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
