Commit 50212fd
authored
feat(ai): Re-export AI SDK manual instrumentation helpers (#6028)
* feat(ai): Re-export AI SDK manual instrumentation helpers
Adds re-exports from @sentry/core for the AI SDK manual instrumentation
helpers so React Native apps can import them directly from
@sentry/react-native:
- instrumentOpenAiClient
- instrumentAnthropicAiClient
- instrumentGoogleGenAIClient
- createLangChainCallbackHandler
- instrumentLangGraph
- instrumentStateGraphCompile
Also re-exports the related types.
The automatic (OpenTelemetry-based) integrations for these SDKs only
work in Node.js runtimes, so React Native apps have to use the manual
client wrappers. Previously users had to reach into @sentry/core to
access them, which is awkward. This change aligns the React Native SDK
with @sentry/browser, which already re-exports the same helpers.
Refs #5297
* Address review: fix CHANGELOG reference and drop typo'd type
- CHANGELOG entry now references the PR number (#6028) so the Danger
check passes.
- Drop the re-export of `GoogleGenAIIstrumentedMethod` — it is a typo
in the upstream `@sentry/core` export (missing 'n'). Will be added
back once the typo is fixed in sentry-javascript.1 parent d145143 commit 50212fd
3 files changed
Lines changed: 39 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
51 | 75 | | |
52 | 76 | | |
53 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
0 commit comments