diff --git a/packages/node/src/types.ts b/packages/node/src/types.ts index fb128653870f..b63c49e440e7 100644 --- a/packages/node/src/types.ts +++ b/packages/node/src/types.ts @@ -1,9 +1,27 @@ -import type { ClientOptions, Options, SamplingContext } from '@sentry/types'; +import type { ClientOptions, Options, SamplingContext, TracePropagationTargets } from '@sentry/types'; import type { NodeClient } from './client'; import type { NodeTransportOptions } from './transports'; export interface BaseNodeOptions { + /** + * List of strings/regex controlling to which outgoing requests + * the SDK will attach tracing headers. + * + * By default the SDK will attach those headers to all outgoing + * requests. If this option is provided, the SDK will match the + * request URL of outgoing requests against the items in this + * array, and only attach tracing headers if a match was found. + * + * @example + * ```js + * Sentry.init({ + * tracePropagationTargets: ['api.site.com'], + * }); + * ``` + */ + tracePropagationTargets?: TracePropagationTargets; + /** * Sets profiling sample rate when @sentry/profiling-node is installed */ diff --git a/packages/types/src/options.ts b/packages/types/src/options.ts index 60d747136d90..74bcfad771f4 100644 --- a/packages/types/src/options.ts +++ b/packages/types/src/options.ts @@ -226,8 +226,8 @@ export interface ClientOptions