{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-tool-call-attribute-loss-in-opentelemetry-genai-agent-spans",
  "title": "What structural signals indicate tool-call attribute loss in OpenTelemetry GenAI agent spans",
  "date_of_record": "2026 November 15",
  "scope": "Applies to OpenTelemetry GenAI semantic conventions (`gen_ai.*`) as emitted by agent frameworks producing `execute_tool` and `chat`/`invoke_agent` spans, specifically when tool-call attributes, token usage, and model invocation events are correlated across a span tree. Does not apply to raw OTLP transport failures or to non-GenAI spans.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-tool-call-attribute-loss-in-opentelemetry-genai-agent-spans.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-tool-call-attribute-loss-in-opentelemetry-genai-agent-spans.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-tool-call-attribute-loss-in-opentelemetry-genai-agent-spans.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 939,
    "python_slice_tokens": 172,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A GenAI agent span can be *structurally valid* (well-formed `gen_ai.operation.name`, non-null span IDs, correct parent linkage) while being *semantically hollow*: the `gen_ai.tool.name`, `gen_ai.tool.call.id`, and `gen_ai.usage.input_tokens`/`output_tokens` attributes are absent, zero, or misattributed. The non-obvious boundary is this: **the absence of `gen...",
    "what_was_observed": "In a multi-tool agent loop (three parallel `execute_tool` spans under one `invoke_agent` span), the following pattern recurred under load: - Each `execute_tool` span carried `gen_ai.tool.name` but only two of three carried `gen_ai.tool.call.id`. - The `invoke_agent` parent reported `gen_ai.usage.input_tokens` equal to the sum of *all* model invocation events, including a retried invocation whose `execute_tool` child ...",
    "condition_of_validity": "This diagnostic is valid only when: 1. The agent framework emits `gen_ai.operation.name = \"execute_tool\"` (per the current GenAI conventions) rather than a custom operation name. 2. The exporter is configured with `OTEL_SEMCONV_STABILITY_OPT_IN=gen_ai_latest_experimental`; under the older `gen_ai.system`-only regime, `tool.call.id` was not standardized and i...",
    "decision_boundary": "Do **not** alert on a single missing `gen_ai.tool.call.id`. Do alert when, over a rolling window, the ratio `distinct(gen_ai.tool.call.id) / count(execute_tool)` falls below 0.99 **and** `count(inference events) / distinct(gen_ai.response.id) > 1.0`. The conjunction is the boundary: attribute loss alone is a telemetry-quality issue; attribute loss *co-occurr...",
    "operational_effect": "Left undetected, this boundary silently doubles the input-token cost attributed to retried tool calls and breaks the invariant that `sum(child tool tokens) <= parent input_tokens`. Downstream cost dashboards that join on `gen_ai.tool.name` will show a tool as \"expensive\" when it is merely \"retried.\" The signal to watch is structural, not numeric: cardinality..."
  },
  "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": "e4f624a4ea1f242ccddda043d137bd4587e1fd224d5a8cbd503d84218b82ded3",
    "verified_classes": [
      "ToolCallCorrelationError",
      "GenAISpanBatch"
    ],
    "verified_functions": [
      "check_tool_call_invariant"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "ToolCallCorrelationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
