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

Function init

packages/hono/src/node/sdk.ts:13–29  ·  view source on GitHub ↗
(options: HonoNodeOptions)

Source from the content-addressed store, hash-verified

11 * This function should be called in an `instrument.ts` file loaded via `--import` to set up Sentry globally for the application.
12 */
13export function init(options: HonoNodeOptions): Client | undefined {
14 const existingClient = getClient();
15 if (existingClient) {
16 existingClient.getOptions().debug && debug.log('Sentry is already initialized, skipping re-initialization.');
17 return existingClient;
18 }
19
20 applySdkMetadata(options, 'hono', ['hono', 'node']);
21
22 const filteredOptions: HonoNodeOptions = {
23 ...options,
24 ignoreSpans: [...(options.ignoreSpans || []), ...LOW_QUALITY_TRANSACTION_PATTERNS],
25 integrations: buildFilteredIntegrations(options.integrations, false),
26 };
27
28 return initNode(filteredOptions);
29}

Callers

nothing calls this directly

Calls 5

getClientFunction · 0.90
applySdkMetadataFunction · 0.90
getOptionsMethod · 0.65
logMethod · 0.65

Tested by

no test coverage detected