{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-lineage-collapse-in-opentelemetry-genai-span-attributes-when-an-agent-re-emits-a-tool-call-under-a-new-trace",
  "title": "What structural signals indicate lineage collapse in OpenTelemetry GenAI span attributes when an agent re-emits a tool call under a new trace",
  "date_of_record": "2026 November 23",
  "scope": "Applies to agent runtimes that emit OpenTelemetry `gen_ai.*` spans per the GenAI semantic conventions and reconstruct invocation lineage from `trace_id`/`span_id`/`parent_span_id` plus `gen_ai.operation.name`, `gen_ai.tool.name`, and `gen_ai.usage.*` attributes. Does not cover vendor-proprietary tracing that bypasses OTel, nor pure metric-only pipelines.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-lineage-collapse-in-opentelemetry-genai-span-attributes-when-an-agent-re-emits-a-tool-call-under-a-new-trace.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-lineage-collapse-in-opentelemetry-genai-span-attributes-when-an-agent-re-emits-a-tool-call-under-a-new-trace.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-lineage-collapse-in-opentelemetry-genai-span-attributes-when-an-agent-re-emits-a-tool-call-under-a-new-trace.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1795,
    "python_slice_tokens": 352,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The GenAI semantic conventions describe *what* a span represents (`gen_ai.operation.name = chat | execute_tool | embeddings`, plus `gen_ai.tool.name`, `gen_ai.request.model`, `gen_ai.usage.input_tokens`/`output_tokens`). They do **not** define a lineage contract. Lineage is an emergent property of the parent/child span tree plus the trace context propagation...",
    "what_was_observed": "A planner-executor agent executing a two-step tool task produced the following span topology across a retry: - Trace A: root `invoke_agent` → child `chat` → child `execute_tool` (`gen_ai.tool.name = \"search\"`), status `ERROR`, no `gen_ai.tool.call.id`. - Trace B (new `trace_id`): root `invoke_agent` → child `chat` → child `execute_tool` (`gen_ai.tool.name = \"search\"`), status `OK`, `gen_ai.tool.call.id = \"call_7f3a\"`...",
    "condition_of_validity": "The invariant — *a re-issued tool call must share a lineage edge with its failed predecessor* — holds only when the runtime treats retries as continuations. It is **not** valid when: - The retry is a deliberate *fresh attempt* under a new task identity (e.g., user-initiated re-run), in which case a new trace is correct and the absence of a link is expected. ...",
    "decision_boundary": "The boundary between \"acceptable trace split\" and \"lineage collapse\" is determined by three conjunctive checks, evaluated in order: 1. **Link check:** Does the retry root span carry a `SpanLink` whose `span_id` matches the failed `execute_tool` span? If yes → acceptable, stop. 2. **Token-parity check:** Is `retry.gen_ai.usage.input_tokens` within a small del...",
    "operational_effect": "When lineage collapse goes undetected: - **Loop detection fails.** An agent stuck retrying a failing tool produces N independent traces, each looking like a fresh healthy invocation. Retry-storm alarms keyed on trace-internal error rates never fire because each trace has exactly one error-free retry. - **Cost attribution double-counts.** The re-serialized hi..."
  },
  "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": "b14be97068e73121c95ee8ea818321006f6fc0647430a1ddb079e1982baead68",
    "verified_classes": [
      "LineageCollapseError",
      "GenAISpanView"
    ],
    "verified_functions": [
      "assert_lineage_preserved",
      "emit_retry_span"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "LineageCollapseError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
