|
1 | 1 | import type { Span as WriteableSpan } from '@opentelemetry/api'; |
2 | 2 | import type { Instrumentation } from '@opentelemetry/instrumentation'; |
3 | 3 | import type { ReadableSpan, SpanProcessor } from '@opentelemetry/sdk-trace-base'; |
4 | | -import type { ClientOptions, Options, SamplingContext, Scope, Span, TracePropagationTargets } from '@sentry/core'; |
| 4 | +import type { BaseWinterTCOptions, ClientOptions, Options, SamplingContext, Scope, Span } from '@sentry/core'; |
5 | 5 | import type { NodeTransportOptions } from '@sentry/node-core'; |
6 | 6 |
|
7 | | -export interface BaseNodeOptions { |
8 | | - /** |
9 | | - * List of strings/regex controlling to which outgoing requests |
10 | | - * the SDK will attach tracing headers. |
11 | | - * |
12 | | - * By default the SDK will attach those headers to all outgoing |
13 | | - * requests. If this option is provided, the SDK will match the |
14 | | - * request URL of outgoing requests against the items in this |
15 | | - * array, and only attach tracing headers if a match was found. |
16 | | - * |
17 | | - * @example |
18 | | - * ```js |
19 | | - * Sentry.init({ |
20 | | - * tracePropagationTargets: ['api.site.com'], |
21 | | - * }); |
22 | | - * ``` |
23 | | - */ |
24 | | - tracePropagationTargets?: TracePropagationTargets; |
25 | | - |
| 7 | +/** |
| 8 | + * Base options for the Sentry Node SDK. |
| 9 | + * Extends the common WinterTC options shared with Bun and other server-side SDKs. |
| 10 | + */ |
| 11 | +export interface BaseNodeOptions extends BaseWinterTCOptions { |
26 | 12 | /** |
27 | 13 | * Sets profiling sample rate when @sentry/profiling-node is installed |
28 | 14 | * |
@@ -74,40 +60,13 @@ export interface BaseNodeOptions { |
74 | 60 | */ |
75 | 61 | includeServerName?: boolean; |
76 | 62 |
|
77 | | - /** Sets an optional server name (device name) */ |
78 | | - serverName?: string; |
79 | | - |
80 | 63 | /** |
81 | 64 | * Include local variables with stack traces. |
82 | 65 | * |
83 | 66 | * Requires the `LocalVariables` integration. |
84 | 67 | */ |
85 | 68 | includeLocalVariables?: boolean; |
86 | 69 |
|
87 | | - /** |
88 | | - * If you use Spotlight by Sentry during development, use |
89 | | - * this option to forward captured Sentry events to Spotlight. |
90 | | - * |
91 | | - * Either set it to true, or provide a specific Spotlight Sidecar URL. |
92 | | - * |
93 | | - * More details: https://spotlightjs.com/ |
94 | | - * |
95 | | - * IMPORTANT: Only set this option to `true` while developing, not in production! |
96 | | - */ |
97 | | - spotlight?: boolean | string; |
98 | | - |
99 | | - /** |
100 | | - * If this is set to true, the SDK will not set up OpenTelemetry automatically. |
101 | | - * In this case, you _have_ to ensure to set it up correctly yourself, including: |
102 | | - * * The `SentrySpanProcessor` |
103 | | - * * The `SentryPropagator` |
104 | | - * * The `SentryContextManager` |
105 | | - * * The `SentrySampler` |
106 | | - * |
107 | | - * If you are registering your own OpenTelemetry Loader Hooks (or `import-in-the-middle` hooks), it is also recommended to set the `registerEsmLoaderHooks` option to false. |
108 | | - */ |
109 | | - skipOpenTelemetrySetup?: boolean; |
110 | | - |
111 | 70 | /** |
112 | 71 | * Provide an array of OpenTelemetry Instrumentations that should be registered. |
113 | 72 | * |
@@ -159,9 +118,6 @@ export interface BaseNodeOptions { |
159 | 118 | * problems. |
160 | 119 | */ |
161 | 120 | shutdownTimeout?: number; |
162 | | - |
163 | | - /** Callback that is executed when a fatal global error occurs. */ |
164 | | - onFatalError?(this: void, error: Error): void; |
165 | 121 | } |
166 | 122 |
|
167 | 123 | /** |
|
0 commit comments