(options: HonoDenoOptions)
| 13 | * When manually calling `init`, add the `honoIntegration` to the `integrations` array to set up the Hono integration. |
| 14 | */ |
| 15 | export 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 | } |
no test coverage detected