-
Notifications
You must be signed in to change notification settings - Fork 136
feat: openai-js url path #2085
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: main
Are you sure you want to change the base?
feat: openai-js url path #2085
Conversation
@arizeai/openinference-core
@arizeai/openinference-instrumentation-bedrock
@arizeai/openinference-instrumentation-bedrock-agent-runtime
@arizeai/openinference-instrumentation-beeai
@arizeai/openinference-instrumentation-langchain
@arizeai/openinference-instrumentation-mcp
@arizeai/openinference-instrumentation-openai
@arizeai/openinference-mastra
@arizeai/openinference-semantic-conventions
@arizeai/openinference-vercel
commit: |
Probably worth a unit test. |
- Extract url.full with complete URL - Extract url.path with deployment info (deployments/model-name/endpoint) - Improve Azure provider detection - Add unit test for URL extraction functionality
agree, added a simple test |
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: Streaming Chat Missing URL Attributes
Streaming chat completion spans are missing URL attributes, unlike their non-streaming counterparts. This occurs because getStoredUrlAttributes
isn't called when processing streaming responses, leading to inconsistent debugging information.
js/packages/openinference-instrumentation-openai/src/instrumentation.ts#L541-L548
openinference/js/packages/openinference-instrumentation-openai/src/instrumentation.ts
Lines 541 to 548 in d4f3297
} else { | |
// This is a streaming response | |
// handle the chunks and add them to the span | |
// First split the stream via tee | |
const [leftStream, rightStream] = result.tee(); | |
consumeChatCompletionStreamChunks(rightStream, span); | |
result = leftStream; | |
} |
resolves #1392