1 | import type { ClientOptions, Options, SamplingContext, TracePropagationTargets } from '@sentry/types';
|
2 | import type { NodeClient } from './client';
|
3 | import type { NodeTransportOptions } from './transports';
|
4 | export interface BaseNodeOptions {
|
5 | /**
|
6 | * List of strings/regex controlling to which outgoing requests
|
7 | * the SDK will attach tracing headers.
|
8 | *
|
9 | * By default the SDK will attach those headers to all outgoing
|
10 | * requests. If this option is provided, the SDK will match the
|
11 | * request URL of outgoing requests against the items in this
|
12 | * array, and only attach tracing headers if a match was found.
|
13 | *
|
14 | * @example
|
15 | * ```js
|
16 | * Sentry.init({
|
17 | * tracePropagationTargets: ['api.site.com'],
|
18 | * });
|
19 | * ```
|
20 | */
|
21 | tracePropagationTargets?: TracePropagationTargets;
|
22 | /**
|
23 | * Sets profiling sample rate when @sentry/profiling-node is installed
|
24 | */
|
25 | profilesSampleRate?: number;
|
26 | /**
|
27 | * Function to compute profiling sample rate dynamically and filter unwanted profiles.
|
28 | *
|
29 | * Profiling is enabled if either this or `profilesSampleRate` is defined. If both are defined, `profilesSampleRate` is
|
30 | * ignored.
|
31 | *
|
32 | * Will automatically be passed a context object of default and optional custom data. See
|
33 | * {@link Transaction.samplingContext} and {@link Hub.startTransaction}.
|
34 | *
|
35 | * @returns A sample rate between 0 and 1 (0 drops the profile, 1 guarantees it will be sent). Returning `true` is
|
36 | * equivalent to returning 1 and returning `false` is equivalent to returning 0.
|
37 | */
|
38 | profilesSampler?: (samplingContext: SamplingContext) => number | boolean;
|
39 | /** Sets an optional server name (device name) */
|
40 | serverName?: string;
|
41 | /**
|
42 | * Include local variables with stack traces.
|
43 | *
|
44 | * Requires the `LocalVariables` integration.
|
45 | */
|
46 | includeLocalVariables?: boolean;
|
47 | /**
|
48 | * Specify a custom NodeClient to be used. Must extend NodeClient!
|
49 | * This is not a public, supported API, but used internally only.
|
50 | *
|
51 | * @hidden
|
52 | * */
|
53 | clientClass?: typeof NodeClient;
|
54 | /**
|
55 | * @deprecated Moved to constructor options of the `Http` and `Undici` integration.
|
56 | * @example
|
57 | * ```js
|
58 | * Sentry.init({
|
59 | * integrations: [
|
60 | * new Sentry.Integrations.Http({
|
61 | * tracing: {
|
62 | * shouldCreateSpanForRequest: (url: string) => false,
|
63 | * }
|
64 | * });
|
65 | * ],
|
66 | * });
|
67 | * ```
|
68 | */
|
69 | shouldCreateSpanForRequest?(this: void, url: string): boolean;
|
70 | /** Callback that is executed when a fatal global error occurs. */
|
71 | onFatalError?(this: void, error: Error): void;
|
72 | }
|
73 | /**
|
74 | * Configuration options for the Sentry Node SDK
|
75 | * @see @sentry/types Options for more information.
|
76 | */
|
77 | export interface NodeOptions extends Options<NodeTransportOptions>, BaseNodeOptions {
|
78 | }
|
79 | /**
|
80 | * Configuration options for the Sentry Node SDK Client class
|
81 | * @see NodeClient for more information.
|
82 | */
|
83 | export interface NodeClientOptions extends ClientOptions<NodeTransportOptions>, BaseNodeOptions {
|
84 | }
|
85 | //# sourceMappingURL=types.d.ts.map |
\ | No newline at end of file |