Skip to content

fix(jsdoc): tracePropagationTargets defaults are localhost and same origin #8749

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 9, 2023
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