Skip to content

Commit 2cfeb04

Browse files
nicohrubecclaude
andauthored
ref(server-utils): Share one orchestrion channel across OpenAI chat/responses/conversations (#22332)
Points the OpenAI `responses` and `conversations` APIs at the existing `chat` channel to reduce the number of tracing channels — all three already report the same `chat` operation with identical span handling, so there's no behavior change. --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent cf559f9 commit 2cfeb04

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

packages/server-utils/src/integrations/tracing-channel/openai.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ const ORIGIN = 'auto.ai.orchestrion.openai';
2929
// Each instrumented `create` method maps to the gen_ai operation its span reports.
3030
const INSTRUMENTED_CHANNELS = [
3131
{ channel: CHANNELS.OPENAI_CHAT, operation: 'chat' },
32-
{ channel: CHANNELS.OPENAI_RESPONSES, operation: 'chat' },
3332
{ channel: CHANNELS.OPENAI_EMBEDDINGS, operation: 'embeddings' },
34-
{ channel: CHANNELS.OPENAI_CONVERSATIONS, operation: 'chat' },
3533
] as const;
3634

3735
/**

packages/server-utils/src/orchestrion/config/openai.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const openaiConfig = [
1111
})),
1212
// OpenAI responses API — same `create(body, options)` shape as chat completions.
1313
...['resources/responses/responses.js', 'resources/responses/responses.mjs'].map(filePath => ({
14-
channelName: 'responses',
14+
channelName: 'chat',
1515
module: { name: 'openai', versionRange: '>=4.0.0 <7', filePath },
1616
functionQuery: { className: 'Responses', methodName: 'create', kind: 'Auto' as const },
1717
})),
@@ -23,15 +23,15 @@ export const openaiConfig = [
2323
})),
2424
// OpenAI conversations API — same `create(body, options)` shape as chat completions.
2525
...['resources/conversations/conversations.js', 'resources/conversations/conversations.mjs'].map(filePath => ({
26-
channelName: 'conversations',
26+
channelName: 'chat',
2727
module: { name: 'openai', versionRange: '>=4.0.0 <7', filePath },
2828
functionQuery: { className: 'Conversations', methodName: 'create', kind: 'Auto' as const },
2929
})),
3030
] satisfies InstrumentationConfig[];
3131

3232
export const openaiChannels = {
33+
// Chat completions, the responses API, and the conversations API all report a `chat` operation with
34+
// identical span handling, so they share one channel.
3335
OPENAI_CHAT: 'orchestrion:openai:chat',
34-
OPENAI_RESPONSES: 'orchestrion:openai:responses',
3536
OPENAI_EMBEDDINGS: 'orchestrion:openai:embeddings',
36-
OPENAI_CONVERSATIONS: 'orchestrion:openai:conversations',
3737
} as const;

0 commit comments

Comments
 (0)