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

Function init

packages/hono/src/deno/sdk.ts:15–35  ·  view source on GitHub ↗
(options: HonoDenoOptions)

Source from the content-addressed store, hash-verified

13 * When manually calling `init`, add the `honoIntegration` to the `integrations` array to set up the Hono integration.
14 */
15export function init(options: HonoDenoOptions): Client | undefined {
16 if (getClient()) {
17 consoleSandbox(() => {
18 // eslint-disable-next-line no-console
19 console.warn(
20 '[Sentry] Sentry is already initialized. Sentry should only be initialized once, through the `sentry()` middleware. Remove the `Sentry.init()` call, if one exists.',
21 );
22 });
23 }
24
25 applySdkMetadata(options, 'hono', ['hono', 'deno']);
26
27 const filteredOptions: HonoDenoOptions = {
28 ...options,
29 ignoreSpans: [...(options.ignoreSpans || []), ...LOW_QUALITY_TRANSACTION_PATTERNS],
30 // Remove Hono from the SDK defaults to prevent double instrumentation: @sentry/deno
31 integrations: buildFilteredIntegrations(options.integrations, false),
32 };
33
34 return initDeno(filteredOptions);
35}

Callers 1

sentryFunction · 0.90

Calls 5

getClientFunction · 0.90
consoleSandboxFunction · 0.90
applySdkMetadataFunction · 0.90
warnMethod · 0.65

Tested by

no test coverage detected