Skip to content

Commit febbb4d

Browse files
committed
chore(mothership): carry the worker renames into the chat routes staging moved
1 parent 3a3f19f commit febbb4d

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

‎apps/sim/app/api/mothership/chat/abort/route.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import {
66
internalRateLimits,
77
internalSessionAuth,
88
} from '@/lib/api/server/routes'
9-
import { TraceSpan } from '@/lib/mothership/generated/trace-spans-v1'
9+
import { TraceSpan } from '@/lib/mothership/observability/trace-spans'
1010
import { abortRun, runControlOperations } from '@/lib/mothership/request/application/controls'
11-
import { withIncomingGoSpan } from '@/lib/mothership/request/otel'
11+
import { withIncomingWorkerSpan } from '@/lib/mothership/request/otel'
1212

1313
const handler = defineInternalJsonRoute({
1414
contract: mothershipChatAbortContract,
@@ -24,6 +24,6 @@ const handler = defineInternalJsonRoute({
2424
})
2525

2626
export const POST = (request: NextRequest, context?: Parameters<typeof handler>[1]) =>
27-
withIncomingGoSpan(request.headers, TraceSpan.CopilotChatAbortStream, undefined, () =>
27+
withIncomingWorkerSpan(request.headers, TraceSpan.CopilotChatAbortStream, undefined, () =>
2828
handler(request, context)
2929
)

‎apps/sim/app/api/mothership/chat/stop/route.ts‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ import { publishChatStatusChanged } from '@/lib/mothership/chat-status'
1919
import {
2020
CopilotChatFinalizeOutcome,
2121
CopilotStopOutcome,
22-
} from '@/lib/mothership/generated/trace-attribute-values-v1'
23-
import { TraceAttr } from '@/lib/mothership/generated/trace-attributes-v1'
24-
import { TraceSpan } from '@/lib/mothership/generated/trace-spans-v1'
25-
import { withIncomingGoSpan } from '@/lib/mothership/request/otel'
22+
} from '@/lib/mothership/observability/trace-attribute-values'
23+
import { TraceAttr } from '@/lib/mothership/observability/trace-attributes'
24+
import { TraceSpan } from '@/lib/mothership/observability/trace-spans'
25+
import { withIncomingWorkerSpan } from '@/lib/mothership/request/otel'
2626

2727
const logger = createLogger('CopilotChatStopAPI')
2828

@@ -31,7 +31,7 @@ const logger = createLogger('CopilotChatStopAPI')
3131
* the aborted server stream unwinding, not this handler.
3232
*/
3333
export const POST = withRouteHandler((req: NextRequest) =>
34-
withIncomingGoSpan(req.headers, TraceSpan.CopilotChatStopStream, undefined, async (span) => {
34+
withIncomingWorkerSpan(req.headers, TraceSpan.CopilotChatStopStream, undefined, async (span) => {
3535
try {
3636
const session = await getSession()
3737
if (!session?.user?.id) {

‎apps/sim/app/api/mothership/chat/stream/route.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,10 @@ import {
2525
import {
2626
CopilotResumeOutcome,
2727
CopilotTransport,
28-
} from '@/lib/mothership/generated/trace-attribute-values-v1'
29-
import { TraceAttr } from '@/lib/mothership/generated/trace-attributes-v1'
30-
import { TraceSpan } from '@/lib/mothership/generated/trace-spans-v1'
28+
} from '@/lib/mothership/observability/trace-attribute-values'
29+
import { TraceAttr } from '@/lib/mothership/observability/trace-attributes'
30+
import { TraceSpan } from '@/lib/mothership/observability/trace-spans'
3131
import { readChatStream } from '@/lib/mothership/request/application/recover-stream'
32-
import { contextFromRequestHeaders } from '@/lib/mothership/request/go/propagation'
3332
import { getCopilotTracer, markSpanForError } from '@/lib/mothership/request/otel'
3433
import {
3534
createEvent,
@@ -48,6 +47,7 @@ import {
4847
SSE_RESPONSE_HEADERS,
4948
} from '@/lib/mothership/request/session'
5049
import { toReplayEnvelope, toStreamBatchEvent } from '@/lib/mothership/request/session/types'
50+
import { contextFromRequestHeaders } from '@/lib/mothership/request/worker/propagation'
5151

5252
export const maxDuration = 3600
5353

0 commit comments

Comments
 (0)