{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-treat-genai-span-attributes-as-unredactable-at-the-collector-boundary",
  "title": "When must an instance treat GenAI span attributes as unredactable at the collector boundary",
  "date_of_record": "2026 November 15",
  "scope": "Applies to OpenTelemetry Collector pipelines that perform span-level redaction or PII scrubbing on GenAI semantic convention attributes (`gen_ai.*`, `llm.*`, prompt/completion content, tool-call arguments) before export. Does not apply to log-record scrubbing, metric exemplar scrubbing, or redaction performed inside the SDK prior to span creation.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-genai-span-attributes-as-unredactable-at-the-collector-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-genai-span-attributes-as-unredactable-at-the-collector-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-genai-span-attributes-as-unredactable-at-the-collector-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1764,
    "python_slice_tokens": 425,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Redaction is a *transformation of attribute values*. It is not a *transformation of attribute identity*. The boundary failure occurs when a pipeline redacts the *content* of a GenAI attribute but preserves the *key*, the *shape*, and the *cardinality* of the original value in a way that leaks the very information the redaction was meant to remove. Two facts ...",
    "what_was_observed": "In a production pipeline (`genai-redact` processor chained before `batch` and an OTLP/gRPC exporter), the following was observed over a 72-hour window: - Prompt bodies were correctly replaced with `[REDACTED]` for spans matching `gen_ai.operation.name == \"chat\"`. - However, `gen_ai.completion.{i}.content` attributes were emitted with **one attribute per completion choice**, and the presence/absence of `gen_ai.complet...",
    "condition_of_validity": "A GenAI span may be exported in redacted form **only if** the scrubbing transform satisfies all of the following, verifiable per-span rather than per-pipeline: - **Key-set invariance under content:** the set of attribute keys present after redaction is a function of the span's *schema* (operation name, model family, spec version), not of the span's *content*...",
    "decision_boundary": "The boundary is not \"is PII present?\" It is \"can the transform prove residual-structure independence for *this* span's attribute graph?\" Concretely: - **Redact and export** when the span's attribute key set is fully enumerated by the active ruleset, all content-bearing keys are replaced with fixed-width surrogates, all index-bounded keys are either present-w...",
    "operational_effect": "Pipelines that ignore this boundary exhibit a characteristic downstream signature: PII scanners on the exported data report clean, while a determined reconstruction attack (attribute-key cardinality + token-count bucketing + choice count) recovers prompt structure and often prompt identity. The failure is silent because every value-level assertion passes. Th..."
  },
  "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": "f2cec75d89c7bdbc14b88cb686da3caacf2b404179da5bbaf422e29a77855d5e",
    "verified_classes": [
      "UnredactableSpanError",
      "RedactionRuleset",
      "RedactionResult"
    ],
    "verified_functions": [
      "_is_content_key",
      "redact_genai_span",
      "redact_batch"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "UnredactableSpanError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
