{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-otel-genai-span-attribute-drift-at-tool-call-fan-out-boundaries",
  "title": "What structural signals indicate OTel GenAI span attribute drift at tool-call fan-out boundaries",
  "date_of_record": "2026 December 2",
  "scope": "Applies to agent runtimes that emit OpenTelemetry spans using the GenAI semantic conventions (`gen_ai.*`) for tool/function invocations, specifically where a single logical tool call is fanned out across retries, streaming partials, or parallel sub-invocations. Does not apply to single-shot, non-retried, non-streamed tool calls where one span maps 1:1 to one invocation.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-otel-genai-span-attribute-drift-at-tool-call-fan-out-boundaries.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-otel-genai-span-attribute-drift-at-tool-call-fan-out-boundaries.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-otel-genai-span-attribute-drift-at-tool-call-fan-out-boundaries.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1605,
    "python_slice_tokens": 307,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The GenAI semantic conventions define `gen_ai.operation.name`, `gen_ai.tool.name`, `gen_ai.tool.call.id`, and `gen_ai.usage.*` as *per-invocation* attributes. The tracing backend treats a span as the unit of truth. The agent runtime, however, treats a *logical tool call* as the unit of truth. These two units diverge the moment a tool call is retried, streame...",
    "what_was_observed": "A tool-calling agent invoked a search tool with a 3-way parallel fan-out (three query variants) under a single logical `tool.call.id`, because the planner treated the fan-out as one semantic step. The runtime emitted three child spans, each with: - `gen_ai.operation.name = \"execute_tool\"` - `gen_ai.tool.name = \"web_search\"` - `gen_ai.tool.call.id = \"call_8f3a...\"` - distinct `span_id`, identical `parent_span_id` Two ...",
    "condition_of_validity": "The invariant \"one `gen_ai.tool.call.id` ⇒ one logical tool invocation\" holds **only if** the runtime guarantees: - At most one span per `call.id` carries `gen_ai.operation.name`, OR - Every additional span with the same `call.id` carries an explicit discriminator: `gen_ai.tool.call.attempt` (monotonic int) for retries, and `gen_ai.tool.call.fanout_index` (i...",
    "decision_boundary": "The runtime must decide, at span-emission time, whether a new span represents a *new logical call* (new `call.id`) or a *continuation of an existing call* (same `call.id` + discriminator). The boundary rule: - **New `call.id`** iff the planner initiated a semantically distinct step (different arguments, different intent). - **Same `call.id` + `attempt`** iff...",
    "operational_effect": "Without the registry, three downstream operations degrade silently: - **Cost attribution** undercounts retried calls (retries lack usage attributes) and double-counts fan-out (each fan-out span may carry full usage). The error is not random; it is biased by retry rate and fan-out degree, so it compounds across a session. - **Replay/audit** cannot reconstruct..."
  },
  "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"
    ]
  },
  "governance": {
    "notice": "Usage of this AI Instance layer is accepting to follow We Instance Constitution (https://weinstance.com) and it is powered by CorpusTech (https://corpusfetch.com)",
    "constitution_uri": "https://weinstance.com",
    "powered_by": "CorpusTech",
    "platform_uri": "https://corpusfetch.com"
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "8f67825a60e448c5951e7f71120afb5185818dbe9416a3e79fd0bec893fd89d4",
    "verified_classes": [
      "CallIdDriftError",
      "CallIdRegistry"
    ],
    "verified_functions": [
      "emit_tool_span",
      "declare_fanout",
      "issue",
      "verify_cardinality"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "CallIdDriftError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
