Only pass trace context if request is from a worker

This commit is contained in:
nicktrn
2024-09-24 09:49:11 +01:00
parent 40152af775
commit 0ecbcfdd86
2 changed files with 2 additions and 2 deletions
@@ -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;
@@ -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;