-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
ref(core): Avoid looking up anthropic-ai integration options #17694
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
size-limit report 📦
|
Contributor
node-overhead report 🧳Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.
|
dev-packages/node-integration-tests/suites/tracing/anthropic/instrument.mjs
Show resolved
Hide resolved
RulaKhaled
approved these changes
Sep 19, 2025
Member
RulaKhaled
left a comment
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.
lgtm
This was referenced Sep 29, 2025
This was referenced Oct 7, 2025
This was referenced Oct 15, 2025
RulaKhaled
added a commit
that referenced
this pull request
Dec 3, 2025
This avoids looking up the integration for openai instrumentation, instead relying on this being passed in (which it already is). When manually instrumenting the client you need to pass in the options directly. 1. Node: Options are passed from the integration to instrumentOpenAiClient anyhow, so nothing changes 2. cloudflare/vercel-edge: There is no integration, users need to manually call instrumentOpenAiClient() and pass in the options anyhow (no integration to look anything up from exists there) See also #17694 Closes #18375 --------- Co-authored-by: RulaKhaled <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This avoids looking up the integration for anthropic-ai instrumentation, instead relying on this being passed in (which it already is). When manually instrumenting the client you need to pass in the options directly.
instrumentAnthropicAiClientanyhow, so nothing changesinstrumentAnthropicAiClient()and pass in the options anyhow (no integration to look anything up from exists there)This required updating the tests to actually use auto instrumentation properly instead of manual client wrapping, which is overall a good change anyhow IMHO.