Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

- Expose screenshot masking options (`screenshot.maskAllText`, `screenshot.maskAllImages`, `screenshot.maskedViewClasses`, `screenshot.unmaskedViewClasses`) for error screenshots ([#6007](https://github.com/getsentry/sentry-react-native/pull/6007))
- Warn Expo users at Metro startup when prebuilt native projects are missing Sentry configuration ([#5984](https://github.com/getsentry/sentry-react-native/pull/5984))
- Re-export AI SDK manual instrumentation helpers (`instrumentOpenAiClient`, `instrumentAnthropicAiClient`, `instrumentGoogleGenAIClient`, `createLangChainCallbackHandler`, `instrumentLangGraph`, `instrumentStateGraphCompile`) for use in React Native apps ([#6028](https://github.com/getsentry/sentry-react-native/pull/6028))
- Add `Sentry.GlobalErrorBoundary` component (and `withGlobalErrorBoundary` HOC) that renders a fallback UI for fatal non-rendering JS errors routed through `ErrorUtils` in addition to the render-phase errors caught by `Sentry.ErrorBoundary`. Opt-in flags `includeNonFatalGlobalErrors` and `includeUnhandledRejections` extend the fallback to non-fatal errors and unhandled promise rejections respectively. ([#6023](https://github.com/getsentry/sentry-react-native/pull/6023))

### Fixes
Expand Down
24 changes: 24 additions & 0 deletions packages/core/src/js/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,30 @@ export {
addEventProcessor,
lastEventId,
consoleSandbox,
instrumentOpenAiClient,
instrumentAnthropicAiClient,
instrumentGoogleGenAIClient,
createLangChainCallbackHandler,
instrumentLangGraph,
instrumentStateGraphCompile,
} from '@sentry/core';

export type {
OpenAiClient,
OpenAiOptions,
InstrumentedMethod,
AnthropicAiClient,
AnthropicAiOptions,
AnthropicAiInstrumentedMethod,
AnthropicAiResponse,
GoogleGenAIClient,
GoogleGenAIChat,
GoogleGenAIOptions,
LangChainOptions,
LangChainIntegration,
LangGraphOptions,
LangGraphIntegration,
CompiledGraph,
} from '@sentry/core';

export {
Expand Down
14 changes: 14 additions & 0 deletions packages/core/test/aiExports.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import * as Sentry from '../src/js';

describe('AI SDK manual instrumentation re-exports', () => {
test.each([
'instrumentOpenAiClient',
'instrumentAnthropicAiClient',
'instrumentGoogleGenAIClient',
'createLangChainCallbackHandler',
'instrumentLangGraph',
'instrumentStateGraphCompile',
])('re-exports %s from @sentry/core', name => {
expect(typeof (Sentry as Record<string, unknown>)[name]).toBe('function');
});
});
Loading