@ogcio/o11y-sdk-node
Version:
Opentelemetry standard instrumentation SDK for NodeJS based project
30 lines (29 loc) • 1.12 kB
TypeScript
import type { NodeSDKConfig } from "../index.js";
import type { NodeOptions as SentryNextjsOptions } from "@sentry/nextjs";
/**
* Options for the withSentryNextjs preset function.
*/
export interface WithSentryNextjsOptions {
/**
* Sentry-specific configuration options for Next.js.
* Passed to Sentry.init() with skipOpenTelemetrySetup: true.
*
* Uses NodeOptions from @sentry/nextjs (server-side configuration).
*/
sentryOptions?: SentryNextjsOptions;
/**
* If true, Sentry's sampling logic (tracesSampleRate/tracesSampler) takes precedence.
* If false, o11y's sampler handles all decisions and Sentry receives all sampled traces.
*
* @default false
*/
useSentrySampling?: boolean;
}
/**
* Enhances a NodeSDKConfig with Sentry integration for Next.js server-side.
*
* includes Next.js-specific integrations
* filters Next.js internal spans (static assets, _next routes, etc...)
* nextjs proper source map resolution
*/
export declare function withSentryNextjs(config: NodeSDKConfig, options?: WithSentryNextjsOptions): Promise<NodeSDKConfig>;