Tracing
Trace Context
Propagate W3C trace context and optional session identity so browser, backend, and logs share the same stored IDs.
W3C traceparent
Format: 00-{trace-id}-{span-id}-{flags}. The Browser SDK injects traceparent on same-origin fetch/XHR. Your backend should continue the trace so stored trace_id matches the browser event.
Session propagation
Same-origin requests may also receive X-Mydle-Session-ID: s_…. Map that into the OTel attribute session.id so customer OTLP persists session_id on traces. Not an auth credential; never determines workspace or project.
Logs context
@mydle/logs can attach active span traceId / spanId when OpenTelemetry context is present. Explicit caller fields win; empty context means no IDs.
Limitations
- Cross-origin / third-party requests do not get
traceparentby default. - Platform
x-request-idis not a product correlation namespace.