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

Function init

packages/bun/src/sdk.ts:102–119  ·  view source on GitHub ↗
(userOptions: BunOptions = {})

Source from the content-addressed store, hash-verified

100 * @see {@link BunOptions} for documentation on configuration options.
101 */
102export function init(userOptions: BunOptions = {}): NodeClient | undefined {
103 applySdkMetadata(userOptions, 'bun');
104
105 const options = {
106 ...userOptions,
107 platform: 'javascript',
108 runtime: { name: 'bun', version: typeof Bun !== 'undefined' ? Bun.version : 'unknown' },
109 serverName: userOptions.serverName || global.process.env.SENTRY_NAME || os.hostname(),
110 };
111
112 options.transport = options.transport || makeFetchTransport;
113
114 if (options.defaultIntegrations === undefined) {
115 options.defaultIntegrations = getDefaultIntegrations(options);
116 }
117
118 return initNode(options);
119}

Callers 2

init.test.tsFile · 0.90
setupClientFunction · 0.90

Calls 2

applySdkMetadataFunction · 0.90
getDefaultIntegrationsFunction · 0.70

Tested by 1

setupClientFunction · 0.72