Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
progres
  • Loading branch information
nicohrubec committed Nov 17, 2025
commit 14d9264447267f21a4adce83574443c626edf967
1 change: 1 addition & 0 deletions packages/core/src/tracing/ai/gen-ai-attributes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ export const OPENAI_USAGE_PROMPT_TOKENS_ATTRIBUTE = 'openai.usage.prompt_tokens'
export const OPENAI_OPERATIONS = {
CHAT: 'chat',
RESPONSES: 'responses',
EMBEDDINGS: 'embeddings',
} as const;

// =============================================================================
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/tracing/openai/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export const OPENAI_INTEGRATION_NAME = 'OpenAI';

// https://platform.openai.com/docs/quickstart?api-mode=responses
// https://platform.openai.com/docs/quickstart?api-mode=chat
export const INSTRUMENTED_METHODS = ['responses.create', 'chat.completions.create'] as const;
export const INSTRUMENTED_METHODS = ['responses.create', 'chat.completions.create', 'embeddings.create'] as const;
export const RESPONSES_TOOL_CALL_EVENT_TYPES = [
'response.output_item.added',
'response.function_call_arguments.delta',
Expand Down
3 changes: 3 additions & 0 deletions packages/core/src/tracing/openai/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ export function getOperationName(methodPath: string): string {
if (methodPath.includes('responses')) {
return OPENAI_OPERATIONS.RESPONSES;
}
if (methodPath.includes('embeddings')) {
return OPENAI_OPERATIONS.EMBEDDINGS;
}
return methodPath.split('.').pop() || 'unknown';
}

Expand Down
Loading