{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-emits-identity-spans-under-mismatched-genai-semantic-conventions-across-a-trace-boundary",
  "title": "What happens when an instance emits identity spans under mismatched GenAI semantic conventions across a trace boundary",
  "date_of_record": "2026 November 23",
  "scope": "Applies to multi-service agent systems where LLM instances emit OpenTelemetry spans annotated with GenAI semantic conventions (`gen_ai.*`) and where `traceparent`/`tracestate` context crosses a service boundary between an agent runtime and a downstream tool/service. Does not apply to single-process, single-span-per-request observability or to non-agentic RPC tracing that carries no model identity attributes.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-emits-identity-spans-under-mismatched-genai-semantic-conventions-across-a-trace-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-emits-identity-spans-under-mismatched-genai-semantic-conventions-across-a-trace-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-emits-identity-spans-under-mismatched-genai-semantic-conventions-across-a-trace-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1451,
    "python_slice_tokens": 217,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct things an \"agent identity span\" can mean, and they are routinely conflated at the boundary: 1. **Trace identity** — the `trace_id`/`span_id`/`trace_flags` tuple propagated in W3C `traceparent`, which is the only thing guaranteed to survive a hop. It is opaque, fixed-width, and carries no semantics. 2. **Agent identity** — the set of `g...",
    "what_was_observed": "An agent runtime (Service A) instruments its LLM call loop and emits a span with `gen_ai.system=openai`, `gen_ai.request.model=gpt-4o`, and a custom `agent.role=planner`. It injects `traceparent` into the outbound MCP call to a tool server (Service B). Service B receives the `traceparent`, starts a child span correctly under the same `trace_id`, and then attempts to attribute the call to an agent by reading `gen_ai.a...",
    "condition_of_validity": "The \"trace context is a complete record of agent identity\" assumption holds **only** under all of the following: - Both endpoints are pinned to the same GenAI semantic-convention version, *and* that version defines the identity keys being joined on. - The emitting service attaches agent identity as **span attributes on the span that owns the `traceparent` in...",
    "decision_boundary": "The boundary is whether the consumer **re-derives** identity or **asserts** it: - If the consumer only needs `trace_id` to correlate timing and causality → propagation is sufficient; no identity claim is made. Safe. - If the consumer makes any decision (cost attribution, safety gating, audit verdict, agent-level rate limiting) that depends on *who the agent ...",
    "operational_effect": "Without the handshake, the observed steady-state effects are: (a) provider names masquerading as agent names in cross-service joins, collapsing many agents into one and corrupting per-agent cost and safety metrics; (b) silent exclusion of agent subtrees from accounting when a renamed operation key fails to match a downstream filter; (c) audit replays that ar..."
  },
  "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": "8f53e18f45c462d0863fdbc9d0150e6bb3a735297f84aeff8d530a339df385e7",
    "verified_classes": [
      "ConventionMismatchError",
      "SpanContext"
    ],
    "verified_functions": [
      "resolve_agent_identity",
      "attribute_tool_call"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ConventionMismatchError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
