Repository navigation
Interoperability: W3C Trace Context and OpenTelemetry GenAI adapter #2
Description
Goal
Make MCT traces interoperable with vendor-neutral distributed tracing and agent-observability tooling while preserving MCT's audit semantics and fail-closed claim boundary.
This work should align with:
The auditable GARAS policy/evaluation foundation is proposed in PR #1.
Critical semantic boundary
MCT currently calls two different values a trace_id:
- runtime IDs shaped as
tr_<32 lowercase hex>; and - 64-hex SHA-256 checkpoint digests.
W3C trace-id is exactly 32 lowercase hexadecimal characters, while W3C parent-id is a 16-hex span identifier. Therefore:
- a validated runtime
tr_<32hex>may map to the W3C trace ID after removingtr_; - a 64-hex checkpoint digest MUST remain an artifact digest and MUST NOT be serialized as a W3C trace ID;
- MCT
parent_trace_idfor a checkpoint chain MUST NOT be copied into W3Cparent-id; - checkpoint lineage should use MCT attributes and, where appropriate, OpenTelemetry span links.
Proposed mapping
| MCT field | Interoperability representation | Rule |
|---|---|---|
runtime TraceID.value |
W3C/OTel trace ID | only after strict tr_<32hex> validation |
live TraceID.parent_id |
OTel parent SpanContext |
only for an actual parent span in the same live trace |
checkpoint_sha256 |
mct.checkpoint.sha256 |
preserve all 64 hex characters |
checkpoint parent_trace_id |
mct.checkpoint.parent_sha256 |
chain metadata or span link; never W3C parent-id |
human_id |
mct.trace.human_id |
readable correlation only |
| GARAS role | mct.agent.role plus applicable gen_ai.agent.* fields |
do not overload hosted-agent identity |
| policy action | gen_ai.operation.name when the standard operation applies; otherwise mct.action |
no invented standard enum values |
| authorization state | mct.authorization.* |
keep required, granted, and execution separate |
external_state_verified |
mct.evidence.external_state_verified |
false remains false unless separately verified |
| collision record | mct.trace.collision span event |
preserve both branches; no silent dominance |
Work items
- Add a no-network-by-default
mct_oteladapter. - Add W3C valid/invalid propagation test vectors.
- Add separate W3C span-ID generation; never derive
parent-idfrom a checkpoint hash. - Export OTLP only through explicit operator configuration.
- Redact prompts, Drive content, credentials, and raw tool arguments by default.
- Add a language-neutral JSON conformance fixture for runtime trace, checkpoint, collision, HOLD, and authorization cases.
- Map GARAS learner/challenger/guide/auditor activity to OpenTelemetry and OpenInference span kinds without claiming official conformance before tests pass.
- Publish a minimal end-to-end example against a local OpenTelemetry Collector.
Collaboration request
Feedback and implementation partners are welcome, especially maintainers or users of OpenTelemetry GenAI conventions, OpenInference, OpenLLMetry, agent checkpointing, guardrails, and tamper-evident audit logs. Useful contributions include field-mapping review, privacy review, conformance vectors, and exporter interoperability tests.
Non-claims
Opening this issue does not claim current compatibility, network reach, partnership, certification, deployment, or participation by any external project. Those claims require independent evidence.
Activity