{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-reject-a-correlated-trace-when-memory-span-parentage-is-reconstructed-after-the-fact-in-an-otel-genai-observability",
  "title": "In what scenarios must an instance reject a correlated trace when memory-span parentage is reconstructed after the fact in an OTel GenAI observability pipeline",
  "date_of_record": "2026 November 30",
  "scope": "Applies to observability pipelines that ingest OpenTelemetry GenAI spans (prompt, tool, retrieval/memory, safety, cost) from LLM agents where span parentage is *inferred* post-hoc rather than emitted by the runtime. Does not apply to pipelines where the agent SDK emits a fully-formed span tree with W3C trace context propagated synchronously at span creation.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-reject-a-correlated-trace-when-memory-span-parentage-is-reconstructed-after-the-fact-in-an-otel-genai-observability.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-reject-a-correlated-trace-when-memory-span-parentage-is-reconstructed-after-the-fact-in-an-otel-genai-observability.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-reject-a-correlated-trace-when-memory-span-parentage-is-reconstructed-after-the-fact-in-an-otel-genai-observability.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2060,
    "python_slice_tokens": 360,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **span parentage as ground truth** versus **span parentage as a reconstruction**. When a runtime emits an OTel span, the `parent_span_id` is a fact recorded at creation time inside the same process that owns the causal relationship. When an observability pipeline *infers* parentage—because the agent framework emits fla...",
    "what_was_observed": "A retrieval-augmented agent emitted spans across three producers into a single OTel collector: - The **agent runtime** emitted `gen_ai.chat` prompt spans with `trace_id` and `span_id`, but with `parent_span_id` set to the *session root*, not the preceding turn. The runtime treated a multi-turn conversation as a flat sequence under one root. - The **tool executor** (a separate gRPC service) emitted `gen_ai.tool.call` ...",
    "condition_of_validity": "The reconstruction heuristic is only valid under a condition that the pipeline never checked: **that no two prompt spans on the same trace (or eligible for cross-trace matching) are open simultaneously, and that every tool/memory span's true parent is the temporally nearest prompt span.** This is a *mutual exclusion* assumption on prompt spans, which holds f...",
    "decision_boundary": "The boundary is between **degraded-but-honest** and **complete-but-false**. A pipeline that drops an unattributable tool span produces a trace with a visible gap; an operator sees `unattributed_tool_spans > 0` and investigates. A pipeline that guesses produces a trace with no gap and a wrong answer, and the operator has no signal to investigate. For GenAI ob...",
    "operational_effect": "After the incident, the pipeline was changed to enforce the uniqueness-of-containment invariant and to treat `trace_id` as immutable. The observable effect was a rise in `unresolved` spans—about 6% of tool spans in the concurrent evaluation workload—which surfaced a second, previously invisible problem: the tool executor's sampler was dropping propagated con..."
  },
  "matched_failure_symptoms": [
    "OOM_KILL_OR_MEMORY_EXHAUSTION"
  ],
  "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": "0c888f332814d2ddcee1d86109665598b3f372bb87b5c78abf1ebf77ff8319be",
    "verified_classes": [
      "CorrelationInvariantViolation",
      "Span"
    ],
    "verified_functions": [
      "reconstruct_parent",
      "attach"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "CorrelationInvariantViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
