-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
ref(core): Add more specific event mechanism
s to openAiIntegration
#17288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: OpenAI Requests Missing Origin Property
Spans created for both streaming and non-streaming OpenAI requests are missing the top-level origin
property. While the SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN
attribute is correctly set, the startSpan
options should also explicitly include origin: 'auto.ai.openai'
.
packages/core/src/utils/openai/index.ts#L238-L242
sentry-javascript/packages/core/src/utils/openai/index.ts
Lines 238 to 242 in 3a7c03a
name: `${operationName} ${model} stream-response`, | |
op: getSpanOperation(methodPath), | |
attributes: requestAttributes as Record<string, SpanAttributeValue>, | |
}, | |
async (span: Span) => { |
packages/core/src/utils/openai/index.ts#L274-L278
sentry-javascript/packages/core/src/utils/openai/index.ts
Lines 274 to 278 in 3a7c03a
// Non-streaming responses | |
return startSpan( | |
{ | |
name: `${operationName} ${model}`, | |
op: getSpanOperation(methodPath), |
size-limit report 📦
|
Also added the
sentry.origin
attribute to the openAi spans since it was missing.mechanism.type
now follows the same patternref #17212
ref #17252