OpenTelemetry trace context lost when sending Webchat messages via Conversations API

Trying to push a canned response into an active chat interaction using the Conversations API. The goal is to keep the OpenTelemetry span active while the message is dispatched.

I’m hitting POST /api/v2/conversations/webchat/{conversationId}/messages with this payload:

{
 "text": "Here is the standard greeting.",
 "from": {
 "id": "bot-agent-id",
 "name": "AutoBot"
 }
}

The request returns a 200 OK. The message shows up in the conversation history immediately. But the span trace in Jaeger shows a gap. The traceparent header I’m injecting into the outbound HTTP request isn’t carrying over to the downstream service that actually renders the text.

Is there a specific header or property I need to attach to the message object for context propagation? Or is the Conversations API stripping custom headers before processing?

I’ve tried adding X-Trace-Id in the headers of the HTTP request itself, but that seems to get ignored by the Genesys endpoint. The SDK documentation mentions context injection for Data Actions, but this is a direct REST call.

Any ideas on how to bridge this gap? The latency is fine, it’s just the trace continuity that’s broken.

You’re missing the trace context headers. The API won’t pick up spans automatically. Add traceparent and tracestate to the request headers.

POST /api/v2/conversations/webchat/{conversationId}/messages
Header: traceparent: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01

Check the W3C spec for the format.