We’re trying to maintain distributed tracing continuity from an external Node.js service into Genesys Cloud Architect flows. The goal is to have the traceparent header propagate through the initial API call and persist in the subsequent Data Action calls within the flow.
I’m launching the flow using POST /api/v2/flows/executions. The request succeeds with a 202 Accepted, and the flow starts executing. However, when I check our Jaeger dashboard, the spans for the internal Data Actions are completely detached from the root span created in our Node.js app. It’s a new trace ID every time.
Here is the request setup:
const traceCtx = tracer.startActiveSpan('gc-flow-trigger', (span) => {
const carrier = {};
tracePropagator.inject(context.active(), carrier);
const options = {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json',
...carrier // Injecting W3C TraceContext headers
},
body: JSON.stringify({
flowId: 'abc-123-def',
parameters: {
'inputValue': 'test-123'
}
})
};
return fetch('https://api.mypurecloud.com/api/v2/flows/executions', options)
.then(res => res.json())
.then(data => {
span.setAttribute('gc.flow.executionId', data.id);
span.end();
});
});
The traceparent header is definitely being sent. I verified this by logging the outgoing request headers. Genesys Cloud acknowledges the request. The flow runs. But the context doesn’t cross the boundary.
I know the Data Action can accept custom headers, but I can’t seem to inject the traceparent into the Data Action request from within the flow designer itself in a way that links back to the external trace. The standard X-GC-Trace-Id header isn’t being set automatically on the outbound Data Action call either.
Is there a specific mechanism to pass the traceparent from the flow execution context into the Data Action’s HTTP request headers? Or is the flow execution engine stripping these headers before the Data Action fires?
We’ve tried mapping the incoming request headers to flow parameters and then injecting them into the Data Action, but the traceparent value seems to get truncated or ignored by the Genesys Cloud API gateway for security reasons.
Any ideas on how to bridge this gap?