MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / init

Function init

packages/react/src/sdk.ts:15–28  ·  view source on GitHub ↗
(options: BrowserOptions)

Source from the content-addressed store, hash-verified

13 * Inits the React SDK
14 */
15export function init(options: BrowserOptions): Client | undefined {
16 const opts = {
17 ...options,
18 };
19
20 applySdkMetadata(opts, 'react');
21 setContext('react', { version });
22 const client = browserInit(opts);
23
24 // Add react-specific stringification
25 setNormalizeStringifier(normalizeStringifyValue);
26
27 return client;
28}
29
30function normalizeStringifyValue(value: Exclude<unknown, string | number | boolean | null>): string | undefined {
31 if (isSyntheticEvent(value)) {

Callers 2

normalize.test.tsFile · 0.90
sdk.test.tsFile · 0.90

Calls 3

applySdkMetadataFunction · 0.85
setNormalizeStringifierFunction · 0.85
setContextFunction · 0.50

Tested by

no test coverage detected