@sentry/node
Version:
Sentry Node SDK using OpenTelemetry for performance instrumentation
37 lines (36 loc) • 2.19 kB
TypeScript
import { Integration, Options } from '@sentry/core';
import { NodeClient } from '@sentry/node-core';
import { NodeOptions } from '../types';
/**
* Get default integrations, excluding performance.
*/
export declare function getDefaultIntegrationsWithoutPerformance(): Integration[];
/** Get the default integrations for the Node SDK. */
export declare function getDefaultIntegrations(options: Options): Integration[];
/**
* When the app opted into diagnostics-channel injection (via
* `experimentalUseDiagnosticsChannelInjection()`) AND span recording is enabled, drop the OTel
* integrations that have a channel-based replacement and append the FULL channel-integration set,
* so the two never both instrument the same library. Otherwise returns `integrations` unchanged.
*
* `_init` applies the same swap to `defaultIntegrations`, but SDKs that seed their integrations
* through the user `integrations` option instead (e.g. the `@sentry/aws-serverless` Lambda layer
* entry) never hit that path, so they call this directly from their own `getDefaultIntegrations`.
*
* Note the asymmetry: appended channel integrations are not limited to ones whose OTel counterpart
* was in `integrations`. For `@sentry/node` that makes no difference (the incoming list carries the
* whole OTel performance set), but a caller with a narrower list (e.g. `@sentry/aws-serverless`)
* gains channel coverage for libraries it never shipped OTel integrations for. Channel integrations
* produce nothing but spans, so this is gated on span recording. Exported so SDKs that build their
* own default-integration set can apply the same logic instead of duplicating it.
*/
export declare function applyDiagnosticsChannelInjectionIntegrations(integrations: Integration[], options: Options): Integration[];
/**
* Initialize Sentry for Node.
*/
export declare function init(options?: NodeOptions | undefined): NodeClient | undefined;
/**
* Initialize Sentry for Node, without any integrations added by default.
*/
export declare function initWithoutDefaultIntegrations(options?: NodeOptions | undefined): NodeClient | undefined;
//# sourceMappingURL=index.d.ts.map