Skip to content

Commit 0ecbcfd

Browse files
committed
Only pass trace context if request is from a worker
1 parent 40152af commit 0ecbcfd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

apps/webapp/app/routes/api.v1.tasks.$taskId.batch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export async function action({ request, params }: ActionFunctionArgs) {
8888
const service = new BatchTriggerTaskService();
8989

9090
const traceContext =
91-
traceparent ?? isFromWorker // If the request is from a worker, we should pass the trace context
91+
traceparent && isFromWorker // If the request is from a worker, we should pass the trace context
9292
? { traceparent, tracestate }
9393
: undefined;
9494

apps/webapp/app/routes/api.v1.tasks.$taskId.trigger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export async function action({ request, params }: ActionFunctionArgs) {
8080

8181
try {
8282
const traceContext =
83-
traceparent ?? isFromWorker /// If the request is from a worker, we should pass the trace context
83+
traceparent && isFromWorker /// If the request is from a worker, we should pass the trace context
8484
? { traceparent, tracestate }
8585
: undefined;
8686

0 commit comments

Comments
 (0)