{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-tail-sampling-collapse-in-high-cardinality-agent-traces-under-adaptive-observability-policies",
  "title": "What structural signals indicate tail-sampling collapse in high-cardinality agent traces under adaptive observability policies",
  "date_of_record": "2026 November 30",
  "scope": "Applies to distributed tracing pipelines that apply adaptive or tail-based sampling to LLM agent execution traces where span attributes include unbounded-cardinality dimensions (tool-call arguments, retrieved chunk IDs, prompt hashes, per-step token counts). Does not apply to head-based fixed-rate sampling of stateless request/response LLM calls, nor to metric-only observability that does not preserve span-level causal structure.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-tail-sampling-collapse-in-high-cardinality-agent-traces-under-adaptive-observability-policies.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-tail-sampling-collapse-in-high-cardinality-agent-traces-under-adaptive-observability-policies.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-tail-sampling-collapse-in-high-cardinality-agent-traces-under-adaptive-observability-policies.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1764,
    "python_slice_tokens": 217,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The naive mental model treats sampling as a stationary Bernoulli process over traces: each trace is kept with probability *p*, and rare failure modes are recovered by lowering *p*. This model is wrong for agent traces because the failure modes we most need to observe—error-compounding loops, mid-task checkpoint divergence, tool-call retry storms—are *structu...",
    "what_was_observed": "Across three agent fleets instrumented with OpenTelemetry-style span emission (span per LLM call, span per tool invocation, span per checkpoint write), the following trace was reconstructed from a tail-sampling gateway configured with a per-attribute cardinality budget of 10,000 distinct values per dimension per minute and an error-priority rule (\"always keep traces containing a span with `status=ERROR`\"). A retrieva...",
    "condition_of_validity": "The collapse is bounded and predictable under the following invariant, which must hold for any adaptive sampler over agent traces: > **Retention independence invariant:** For any span attribute dimension *D* used in the admission decision, the keep-probability of a trace must be conditionally independent of the *cardinality state* of *D* at admission time, g...",
    "decision_boundary": "The operational decision is whether a given high-cardinality dimension should be handled by *pre-admission projection* or *post-admission retention weighting*. The boundary is determined by whether the dimension is *diagnostic* (its values carry information about failure mode) or *incidental* (its values are identifiers with no failure-mode correlation). - *...",
    "operational_effect": "The downstream effect is a specific and dangerous form of observability debt: the sampler's feedback loop converges to a *stable under-observation* of the failure modes it was built to catch. Because the loop is self-reinforcing (high-cardinality failure traces are dropped → the dimension's observed cardinality stays low → the budget is not exceeded → the po..."
  },
  "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": "108fa404067dcd866f33edbc76f403a28ddd6f97e3be06ccb0a5286f68f74ecb",
    "verified_classes": [
      "SamplingCollapseError",
      "DimensionState",
      "SamplerAudit"
    ],
    "verified_functions": [
      "audit_sampler",
      "distinct_ratio",
      "assert_retention_independence"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SamplingCollapseError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
