diff --git a/apps/webapp/app/routes/api.v1.tasks.$taskId.batch.ts b/apps/webapp/app/routes/api.v1.tasks.$taskId.batch.ts index 088b3227a..04f452d61 100644 --- a/apps/webapp/app/routes/api.v1.tasks.$taskId.batch.ts +++ b/apps/webapp/app/routes/api.v1.tasks.$taskId.batch.ts @@ -88,7 +88,7 @@ export async function action({ request, params }: ActionFunctionArgs) { const service = new BatchTriggerTaskService(); const traceContext = - traceparent ?? isFromWorker // If the request is from a worker, we should pass the trace context + traceparent && isFromWorker // If the request is from a worker, we should pass the trace context ? { traceparent, tracestate } : undefined; diff --git a/apps/webapp/app/routes/api.v1.tasks.$taskId.trigger.ts b/apps/webapp/app/routes/api.v1.tasks.$taskId.trigger.ts index 7a1a590bc..18f09560a 100644 --- a/apps/webapp/app/routes/api.v1.tasks.$taskId.trigger.ts +++ b/apps/webapp/app/routes/api.v1.tasks.$taskId.trigger.ts @@ -80,7 +80,7 @@ export async function action({ request, params }: ActionFunctionArgs) { try { const traceContext = - traceparent ?? isFromWorker /// If the request is from a worker, we should pass the trace context + traceparent && isFromWorker /// If the request is from a worker, we should pass the trace context ? { traceparent, tracestate } : undefined;