Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,6 @@ function NoLogsView({ run, resizable }: LoaderData) {
min={resizableSettings.parent.inspector.min}
isStaticAtRest
>
{" "}
<SpanView runParam={run.friendlyId} spanId={run.spanId} />
</ResizablePanel>
</ResizablePanelGroup>
Expand Down
8 changes: 7 additions & 1 deletion apps/webapp/app/routes/api.v1.tasks.$taskId.batch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export async function action({ request, params }: ActionFunctionArgs) {
"idempotency-key": idempotencyKey,
"trigger-version": triggerVersion,
"x-trigger-span-parent-as-link": spanParentAsLink,
"x-trigger-worker": isFromWorker,
traceparent,
tracestate,
} = headers.data;
Expand Down Expand Up @@ -86,11 +87,16 @@ 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, tracestate }
: undefined;

try {
const result = await service.call(taskId, authenticationResult.environment, body.data, {
idempotencyKey: idempotencyKey ?? undefined,
triggerVersion: triggerVersion ?? undefined,
traceContext: traceparent ? { traceparent, tracestate } : undefined,
traceContext,
spanParentAsLink: spanParentAsLink === 1,
});

Expand Down
9 changes: 3 additions & 6 deletions apps/webapp/app/routes/api.v1.tasks.$taskId.trigger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,10 @@ export async function action({ request, params }: ActionFunctionArgs) {
const service = new TriggerTaskService();

try {
const traceContext = traceparent
? !triggerVersion // If the trigger version is NOT set, we are in an older version of the SDK
const traceContext =
traceparent ?? isFromWorker /// If the request is from a worker, we should pass the trace context
? { traceparent, tracestate }
: isFromWorker // If the trigger version is set, and the request is from a worker, we should pass the trace context
? { traceparent, tracestate }
: undefined
: undefined;
: undefined;

logger.debug("Triggering task", {
taskId,
Expand Down
Loading