I’m trying to stitch together the trace context when a voice interaction hands over from CXone Studio to our NICE Cognigy bot. The flow works fine functionally, but the distributed tracing breaks at the handover point.
I’ve got a Data Action that triggers the Cognigy session creation via the /api/v2/conversations/voice/{conversationId}/handoff endpoint. I’m injecting the traceparent header into the custom metadata of the Studio session before the handoff.
Here’s the Studio snippet where I set the metadata:
ASSIGN session.metadata.traceparent = opentelemetry.propagator.extract(context)
Then in the Cognigy bot, I’m reading the metadata from the sessionData object passed during the handover. The issue is that the traceparent value seems to get stripped or malformed by the time it hits the Cognigy backend.
I’m seeing this error in my Jaeger UI:
ERROR: Failed to parse traceparent header: invalid format
The header looks like 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01 in the Studio logs, but Cognigy receives something truncated or null.
Is there a known limitation with metadata payload size or special character escaping during the Studio-to-Cognigy handover? Or am I missing a step in propagating the context through the CXone platform?
I’ve tried URL-encoding the header value before assigning it to the metadata, but that didn’t help. The Cognigy side is using the standard session.getMetadata('traceparent') call to retrieve it.
Any ideas on how to preserve the full W3C trace context across this boundary?