Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion packages/node/src/types.ts
Original file line number Diff line number Diff line change
@@ -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
*/
Expand Down
6 changes: 4 additions & 2 deletions packages/types/src/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ export interface ClientOptions<TO extends BaseTransportOptions = BaseTransportOp
* 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
* By default the SDK will attach those headers to all requests to localhost
* and same origin. 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.
*
Expand All @@ -237,6 +237,8 @@ export interface ClientOptions<TO extends BaseTransportOptions = BaseTransportOp
* tracePropagationTargets: ['api.site.com'],
* });
* ```
*
* Default: ['localhost', /^\//] {@see DEFAULT_TRACE_PROPAGATION_TARGETS}
*/
tracePropagationTargets?: TracePropagationTargets;

Expand Down