Files
github-actions[bot] 04e78129dc Propagate trace context to vercel-workflow.com in workbench instrumentation (#2601) (#2602)
* Propagate trace context to vercel-workflow.com in workbench instrumentation

@vercel/otel only propagates W3C trace context to Vercel deployment URLs
by default, so outgoing requests to the workflow-server
(vercel-workflow.com) got a client span with no `traceparent` header —
breaking the APM trace link to workflow-server's spans. Add
`instrumentationConfig.fetch.propagateContextUrls` for the workflow-server
domain in every workbench that uses @vercel/otel: example,
nextjs-turbopack, nextjs-webpack, and sveltekit. The Next.js and SvelteKit
apps already declared @vercel/otel but weren't registering it at all; they
now do.



* Also propagate trace context to the Vercel Queue Service (vercel-queue.com)

The workflow-server queue path (@vercel/queue) sends to regional
vercel-queue.com subdomains (e.g. iad1.vercel-queue.com) when not using the
queues proxy, which were missing a `traceparent` header for the same reason
as vercel-workflow.com. Add `/vercel-queue\.com/` to propagateContextUrls in
all four workbench instrumentation configs.



---------

Signed-off-by: Pranay Prakash <pranay.gp@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
2026-06-29 13:04:09 -07:00

19 lines
775 B
TypeScript

import { registerOTel } from '@vercel/otel';
registerOTel({
serviceName: 'example-workflow',
instrumentationConfig: {
fetch: {
// By default @vercel/otel only propagates W3C trace context to Vercel
// deployment URLs, so outgoing requests to the workflow-server
// (vercel-workflow.com) and the Vercel Queue Service
// (*.vercel-queue.com) get a client span with no `traceparent` header —
// which breaks the trace link to those services' spans in APM.
// Explicitly propagate context to both domains so traces stay
// correlated end to end.
// https://vercel.com/docs/tracing/instrumentation#configuring-context-propagation
propagateContextUrls: [/vercel-workflow\.com/, /vercel-queue\.com/],
},
},
});