Only pass trace context if request is from a worker
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user