@sentry/node 10.50.0-alpha.0 → 10.50.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.js +7 -7
- package/build/cjs/integrations/{node-fetch.js → node-fetch/index.js} +3 -3
- package/build/cjs/integrations/node-fetch/index.js.map +1 -0
- package/build/cjs/integrations/node-fetch/vendored/undici.js +484 -0
- package/build/cjs/integrations/node-fetch/vendored/undici.js.map +1 -0
- package/build/cjs/sdk/index.js +2 -2
- package/build/cjs/sdk/index.js.map +1 -1
- package/build/esm/index.js +3 -3
- package/build/esm/integrations/{node-fetch.js → node-fetch/index.js} +2 -2
- package/build/esm/integrations/node-fetch/index.js.map +1 -0
- package/build/esm/integrations/node-fetch/vendored/undici.js +482 -0
- package/build/esm/integrations/node-fetch/vendored/undici.js.map +1 -0
- package/build/esm/package.json +1 -1
- package/build/esm/sdk/index.js +1 -1
- package/build/types/index.d.ts +2 -2
- package/build/types/index.d.ts.map +1 -1
- package/build/types/integrations/{node-fetch.d.ts → node-fetch/index.d.ts} +2 -2
- package/build/types/integrations/node-fetch/index.d.ts.map +1 -0
- package/build/types/integrations/node-fetch/vendored/internal-types.d.ts +25 -0
- package/build/types/integrations/node-fetch/vendored/internal-types.d.ts.map +1 -0
- package/build/types/integrations/node-fetch/vendored/types.d.ts +62 -0
- package/build/types/integrations/node-fetch/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/node-fetch/vendored/undici.d.ts +22 -0
- package/build/types/integrations/node-fetch/vendored/undici.d.ts.map +1 -0
- package/build/types-ts3.8/index.d.ts +2 -2
- package/build/types-ts3.8/integrations/{node-fetch.d.ts → node-fetch/index.d.ts} +2 -2
- package/build/types-ts3.8/integrations/node-fetch/vendored/internal-types.d.ts +25 -0
- package/build/types-ts3.8/integrations/node-fetch/vendored/types.d.ts +62 -0
- package/build/types-ts3.8/integrations/node-fetch/vendored/undici.d.ts +22 -0
- package/package.json +4 -5
- package/build/cjs/integrations/node-fetch.js.map +0 -1
- package/build/esm/integrations/node-fetch.js.map +0 -1
- package/build/types/integrations/node-fetch.d.ts.map +0 -1
package/build/esm/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"module","version":"10.50.0
|
|
1
|
+
{"type":"module","version":"10.50.0","sideEffects":false}
|
package/build/esm/sdk/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { applySdkMetadata, hasSpansEnabled } from '@sentry/core';
|
|
2
2
|
import { init as init$1, validateOpenTelemetrySetup, getDefaultIntegrations as getDefaultIntegrations$1 } from '@sentry/node-core';
|
|
3
3
|
import { httpIntegration } from '../integrations/http.js';
|
|
4
|
-
import { nativeNodeFetchIntegration } from '../integrations/node-fetch.js';
|
|
4
|
+
import { nativeNodeFetchIntegration } from '../integrations/node-fetch/index.js';
|
|
5
5
|
import { getAutoPerformanceIntegrations } from '../integrations/tracing/index.js';
|
|
6
6
|
import { initOpenTelemetry } from './initOtel.js';
|
|
7
7
|
|
package/build/types/index.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ export { initOpenTelemetry, preloadOpenTelemetry } from './sdk/initOtel';
|
|
|
36
36
|
export { getAutoPerformanceIntegrations } from './integrations/tracing';
|
|
37
37
|
export type { NodeOptions } from './types';
|
|
38
38
|
export { setOpenTelemetryContextAsyncContextStrategy as setNodeAsyncContextStrategy, } from '@sentry/opentelemetry';
|
|
39
|
-
export { addBreadcrumb, isInitialized, isEnabled, getGlobalScope, lastEventId, close, createTransport, flush, SDK_VERSION, getSpanStatusFromHttpCode, setHttpStatus, captureCheckIn, withMonitor, requestDataIntegration, functionToStringIntegration, inboundFiltersIntegration, eventFiltersIntegration, linkedErrorsIntegration, addEventProcessor, setContext, setExtra, setExtras, setTag, setTags, setUser, setConversationId, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, setCurrentClient, Scope, setMeasurement, getSpanDescendants, parameterize, getClient, getCurrentScope, getIsolationScope, getTraceData, getTraceMetaTags, httpHeadersToSpanAttributes, winterCGHeadersToDict, continueTrace, withScope, withIsolationScope, captureException, captureEvent, captureMessage, captureFeedback, captureConsoleIntegration, dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration, startSession, captureSession, endSession, addIntegration, startSpan, startSpanManual, startInactiveSpan, startNewTrace, suppressTracing, getActiveSpan, withActiveSpan, getRootSpan, spanToJSON, spanToTraceHeader, spanToBaggageHeader, trpcMiddleware, updateSpanName, supabaseIntegration, instrumentSupabaseClient, instrumentOpenAiClient, instrumentAnthropicAiClient, instrumentGoogleGenAIClient, zodErrorsIntegration, profiler, consoleLoggingIntegration, createConsolaReporter,
|
|
39
|
+
export { addBreadcrumb, isInitialized, isEnabled, getGlobalScope, lastEventId, close, createTransport, flush, SDK_VERSION, getSpanStatusFromHttpCode, setHttpStatus, captureCheckIn, withMonitor, requestDataIntegration, functionToStringIntegration, inboundFiltersIntegration, eventFiltersIntegration, linkedErrorsIntegration, addEventProcessor, setContext, setExtra, setExtras, setTag, setTags, setUser, setConversationId, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, setCurrentClient, Scope, setMeasurement, getSpanDescendants, parameterize, getClient, getCurrentScope, getIsolationScope, getTraceData, getTraceMetaTags, httpHeadersToSpanAttributes, winterCGHeadersToDict, continueTrace, withScope, withIsolationScope, captureException, captureEvent, captureMessage, captureFeedback, captureConsoleIntegration, dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration, startSession, captureSession, endSession, addIntegration, startSpan, startSpanManual, startInactiveSpan, startNewTrace, suppressTracing, getActiveSpan, withActiveSpan, getRootSpan, spanToJSON, spanToTraceHeader, spanToBaggageHeader, trpcMiddleware, updateSpanName, supabaseIntegration, instrumentSupabaseClient, instrumentOpenAiClient, instrumentAnthropicAiClient, instrumentGoogleGenAIClient, zodErrorsIntegration, profiler, consoleLoggingIntegration, createConsolaReporter, wrapMcpServerWithSentry, featureFlagsIntegration, spanStreamingIntegration, createLangChainCallbackHandler, instrumentLangChainEmbeddings, instrumentLangGraph, instrumentStateGraphCompile, } from '@sentry/core';
|
|
40
40
|
export type { Breadcrumb, BreadcrumbHint, PolymorphicRequest, RequestEventData, SdkInfo, Event, EventHint, ErrorEvent, Exception, Session, SeverityLevel, StackFrame, Stacktrace, Thread, User, Span, Metric, Log, LogSeverityLevel, FeatureFlagsIntegration, ExclusiveEventHintOrCaptureContext, CaptureContext, } from '@sentry/core';
|
|
41
|
-
export { logger, metrics, httpServerIntegration, httpServerSpansIntegration, nodeContextIntegration, contextLinesIntegration, localVariablesIntegration, modulesIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, anrIntegration, disableAnrDetectionForCallback, spotlightIntegration, childProcessIntegration, processSessionIntegration, nodeRuntimeMetricsIntegration, type NodeRuntimeMetricsOptions, pinoIntegration, createSentryWinstonTransport, SentryContextManager, systemErrorIntegration, generateInstrumentOnce, getSentryRelease, defaultStackParser, createGetModuleFromFilename, makeNodeTransport, NodeClient, cron, NODE_VERSION, validateOpenTelemetrySetup, withStreamedSpan, _INTERNAL_normalizeCollectionInterval, } from '@sentry/node-core';
|
|
41
|
+
export { logger, metrics, httpServerIntegration, httpServerSpansIntegration, nodeContextIntegration, contextLinesIntegration, localVariablesIntegration, modulesIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, anrIntegration, disableAnrDetectionForCallback, spotlightIntegration, childProcessIntegration, processSessionIntegration, nodeRuntimeMetricsIntegration, type NodeRuntimeMetricsOptions, consoleIntegration, pinoIntegration, createSentryWinstonTransport, SentryContextManager, systemErrorIntegration, generateInstrumentOnce, getSentryRelease, defaultStackParser, createGetModuleFromFilename, makeNodeTransport, NodeClient, cron, NODE_VERSION, validateOpenTelemetrySetup, withStreamedSpan, _INTERNAL_normalizeCollectionInterval, } from '@sentry/node-core';
|
|
42
42
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AACnH,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC9F,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACrF,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,6B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,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,aAAa,EACb,aAAa,EACb,SAAS,EACT,cAAc,EACd,WAAW,EACX,KAAK,EACL,eAAe,EACf,KAAK,EACL,WAAW,EACX,yBAAyB,EACzB,aAAa,EACb,cAAc,EACd,WAAW,EACX,sBAAsB,EACtB,2BAA2B,EAE3B,yBAAyB,EACzB,uBAAuB,EACvB,uBAAuB,EACvB,iBAAiB,EACjB,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,iBAAiB,EACjB,4BAA4B,EAC5B,gCAAgC,EAChC,gCAAgC,EAChC,qCAAqC,EACrC,gBAAgB,EAChB,KAAK,EACL,cAAc,EACd,kBAAkB,EAClB,YAAY,EACZ,SAAS,EACT,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,2BAA2B,EAC3B,qBAAqB,EACrB,aAAa,EACb,SAAS,EACT,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,eAAe,EACf,yBAAyB,EACzB,iBAAiB,EACjB,yBAAyB,EACzB,wBAAwB,EACxB,YAAY,EACZ,cAAc,EACd,UAAU,EACV,cAAc,EACd,SAAS,EACT,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,aAAa,EACb,cAAc,EACd,WAAW,EACX,UAAU,EACV,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,wBAAwB,EACxB,sBAAsB,EACtB,2BAA2B,EAC3B,2BAA2B,EAC3B,oBAAoB,EACpB,QAAQ,EACR,yBAAyB,EACzB,qBAAqB,EACrB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,a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8BAA8B,EAC9B,+BAA+B,EAE/B,cAAc,EAEd,8BAA8B,EAC9B,oBAAoB,EACpB,uBAAuB,EACvB,yBAAyB,EACzB,6BAA6B,EAC7B,KAAK,yBAAyB,EAC9B,kBAAkB,EAClB,eAAe,EACf,4BAA4B,EAC5B,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,EACtB,gBAAgB,EAChB,kBAAkB,EAClB,2BAA2B,EAC3B,iBAAiB,EACjB,UAAU,EACV,IAAI,EACJ,YAAY,EACZ,0BAA0B,EAC1B,gBAAgB,EAChB,qCAAqC,GACtC,MAAM,mBAAmB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { UndiciInstrumentationConfig } from '
|
|
1
|
+
import type { UndiciInstrumentationConfig } from './vendored/types';
|
|
2
2
|
interface NodeFetchOptions extends Pick<UndiciInstrumentationConfig, 'requestHook' | 'responseHook' | 'headersToSpanAttributes'> {
|
|
3
3
|
/**
|
|
4
4
|
* Whether breadcrumbs should be recorded for requests.
|
|
@@ -33,4 +33,4 @@ export declare const nativeNodeFetchIntegration: (options?: NodeFetchOptions | u
|
|
|
33
33
|
/** Exported only for tests. */
|
|
34
34
|
export declare function _getConfigWithDefaults(options?: Partial<NodeFetchOptions>): UndiciInstrumentationConfig;
|
|
35
35
|
export {};
|
|
36
|
-
//# sourceMappingURL=
|
|
36
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/integrations/node-fetch/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AAkBpE,UAAU,gBAAiB,SAAQ,IAAI,CACrC,2BAA2B,EAC3B,aAAa,GAAG,cAAc,GAAG,yBAAyB,CAC3D;IACC;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;;;;;;;OAQG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;;OAGG;IACH,sBAAsB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;CACnD;AAqCD,eAAO,MAAM,0BAA0B,gFAAiD,CAAC;AAyBzF,+BAA+B;AAC/B,wBAAgB,sBAAsB,CAAC,OAAO,GAAE,OAAO,CAAC,gBAAgB,CAAM,GAAG,2BAA2B,CAkC3G"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { UndiciRequest, UndiciResponse } from './types';
|
|
2
|
+
export interface ListenerRecord {
|
|
3
|
+
name: string;
|
|
4
|
+
unsubscribe: () => void;
|
|
5
|
+
}
|
|
6
|
+
export interface RequestMessage {
|
|
7
|
+
request: UndiciRequest;
|
|
8
|
+
}
|
|
9
|
+
export interface RequestHeadersMessage {
|
|
10
|
+
request: UndiciRequest;
|
|
11
|
+
socket: any;
|
|
12
|
+
}
|
|
13
|
+
export interface ResponseHeadersMessage {
|
|
14
|
+
request: UndiciRequest;
|
|
15
|
+
response: UndiciResponse;
|
|
16
|
+
}
|
|
17
|
+
export interface RequestTrailersMessage {
|
|
18
|
+
request: UndiciRequest;
|
|
19
|
+
response: UndiciResponse;
|
|
20
|
+
}
|
|
21
|
+
export interface RequestErrorMessage {
|
|
22
|
+
request: UndiciRequest;
|
|
23
|
+
error: Error;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=internal-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal-types.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/node-fetch/vendored/internal-types.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE7D,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,aAAa,CAAC;CACxB;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,aAAa,CAAC;IACvB,MAAM,EAAE,GAAG,CAAC;CACb;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,aAAa,CAAC;IACvB,QAAQ,EAAE,cAAc,CAAC;CAC1B;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,aAAa,CAAC;IACvB,QAAQ,EAAE,cAAc,CAAC;CAC1B;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,aAAa,CAAC;IACvB,KAAK,EAAE,KAAK,CAAC;CACd"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { InstrumentationConfig } from '@opentelemetry/instrumentation';
|
|
2
|
+
import type { Attributes, Span } from '@opentelemetry/api';
|
|
3
|
+
export interface UndiciRequest {
|
|
4
|
+
origin: string;
|
|
5
|
+
method: string;
|
|
6
|
+
path: string;
|
|
7
|
+
/**
|
|
8
|
+
* Serialized string of headers in the form `name: value\r\n` for v5
|
|
9
|
+
* Array of strings `[key1, value1, key2, value2]`, where values are
|
|
10
|
+
* `string | string[]` for v6
|
|
11
|
+
*/
|
|
12
|
+
headers: string | (string | string[])[];
|
|
13
|
+
/**
|
|
14
|
+
* Helper method to add headers (from v6)
|
|
15
|
+
*/
|
|
16
|
+
addHeader: (name: string, value: string) => void;
|
|
17
|
+
throwOnError: boolean;
|
|
18
|
+
completed: boolean;
|
|
19
|
+
aborted: boolean;
|
|
20
|
+
idempotent: boolean;
|
|
21
|
+
contentLength: number | null;
|
|
22
|
+
contentType: string | null;
|
|
23
|
+
body: any;
|
|
24
|
+
}
|
|
25
|
+
export interface UndiciResponse {
|
|
26
|
+
headers: Buffer[];
|
|
27
|
+
statusCode: number;
|
|
28
|
+
statusText: string;
|
|
29
|
+
}
|
|
30
|
+
export interface IgnoreRequestFunction<T = UndiciRequest> {
|
|
31
|
+
(request: T): boolean;
|
|
32
|
+
}
|
|
33
|
+
export interface RequestHookFunction<T = UndiciRequest> {
|
|
34
|
+
(span: Span, request: T): void;
|
|
35
|
+
}
|
|
36
|
+
export interface ResponseHookFunction<RequestType = UndiciRequest, ResponseType = UndiciResponse> {
|
|
37
|
+
(span: Span, info: {
|
|
38
|
+
request: RequestType;
|
|
39
|
+
response: ResponseType;
|
|
40
|
+
}): void;
|
|
41
|
+
}
|
|
42
|
+
export interface StartSpanHookFunction<T = UndiciRequest> {
|
|
43
|
+
(request: T): Attributes;
|
|
44
|
+
}
|
|
45
|
+
export interface UndiciInstrumentationConfig<RequestType = UndiciRequest, ResponseType = UndiciResponse> extends InstrumentationConfig {
|
|
46
|
+
/** Not trace all outgoing requests that matched with custom function */
|
|
47
|
+
ignoreRequestHook?: IgnoreRequestFunction<RequestType>;
|
|
48
|
+
/** Function for adding custom attributes before request is handled */
|
|
49
|
+
requestHook?: RequestHookFunction<RequestType>;
|
|
50
|
+
/** Function called once response headers have been received */
|
|
51
|
+
responseHook?: ResponseHookFunction<RequestType, ResponseType>;
|
|
52
|
+
/** Function for adding custom attributes before a span is started */
|
|
53
|
+
startSpanHook?: StartSpanHookFunction<RequestType>;
|
|
54
|
+
/** Require parent to create span for outgoing requests */
|
|
55
|
+
requireParentforSpans?: boolean;
|
|
56
|
+
/** Map the following HTTP headers to span attributes. */
|
|
57
|
+
headersToSpanAttributes?: {
|
|
58
|
+
requestHeaders?: string[];
|
|
59
|
+
responseHeaders?: string[];
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/node-fetch/vendored/types.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,oB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;AAID,MAAM,WAAW,2BAA2B,CAC1C,WAAW,GAAG,aAAa,EAC3B,YAAY,GAAG,cAAc,CAC7B,SAAQ,qBAAqB;IAC7B,wEAAwE;IACxE,iBAAiB,CAAC,EAAE,qBAAqB,CAAC,WAAW,CAAC,CAAC;IACvD,sEAAsE;IACtE,WAAW,CAAC,EAAE,mBAAmB,CAAC,WAAW,CAAC,CAAC;IAC/C,+DAA+D;IAC/D,YAAY,CAAC,EAAE,oBAAoB,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;IAC/D,qEAAqE;IACrE,aAAa,CAAC,EAAE,qBAAqB,CAAC,WAAW,CAAC,CAAC;IACnD,0DAA0D;IAC1D,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,yDAAyD;IACzD,uBAAuB,CAAC,EAAE;QACxB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;QAC1B,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;KAC5B,CAAC;CACH"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { InstrumentationBase } from '@opentelemetry/instrumentation';
|
|
2
|
+
import type { UndiciInstrumentationConfig } from './types';
|
|
3
|
+
export declare class UndiciInstrumentation extends InstrumentationBase<UndiciInstrumentationConfig> {
|
|
4
|
+
private _channelSubs;
|
|
5
|
+
private _recordFromReq;
|
|
6
|
+
private _httpClientDurationHistogram;
|
|
7
|
+
constructor(config?: UndiciInstrumentationConfig);
|
|
8
|
+
protected init(): undefined;
|
|
9
|
+
disable(): void;
|
|
10
|
+
enable(): void;
|
|
11
|
+
protected _updateMetricInstruments(): void;
|
|
12
|
+
private subscribeToChannel;
|
|
13
|
+
private parseRequestHeaders;
|
|
14
|
+
private onRequestCreated;
|
|
15
|
+
private onRequestHeaders;
|
|
16
|
+
private onResponseHeaders;
|
|
17
|
+
private onDone;
|
|
18
|
+
private onError;
|
|
19
|
+
private recordRequestDuration;
|
|
20
|
+
private getRequestMethod;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=undici.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"undici.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/node-fetch/vendored/undici.ts"],"names":[],"mappings":"AA0BA,OAAO,EAAE,mBAAmB,EAA0B,MAAM,gCAAgC,CAAC;AAoC7F,OAAO,KAAK,EAAE,2BAA2B,EAAiB,MAAM,SAAS,CAAC;AAc1E,qBAAa,qBAAsB,SAAQ,mBAAmB,CAAC,2BAA2B,CAAC;IAGzF,QAAgB,YAAY,CAAwB;IACpD,OAAO,CAAC,cAAc,CAAuD;IAE7E,QAAgB,4BAA4B,CAAY;gBAE5C,MAAM,GAAE,2BAAgC;cAKjC,IAAI;IAId,OAAO,IAAI,IAAI;IAMf,MAAM,IAAI,IAAI;cA4BJ,wBAAwB;IAW3C,OAAO,CAAC,kBAAkB;IAyB1B,OAAO,CAAC,mBAAmB;IA+C3B,OAAO,CAAC,gBAAgB;IAgIxB,OAAO,CAAC,gBAAgB;IAmCxB,OAAO,CAAC,iBAAiB;IAqDzB,OAAO,CAAC,MAAM;IAuBd,OAAO,CAAC,OAAO;IA4Bf,OAAO,CAAC,qBAAqB;IAuB7B,OAAO,CAAC,gBAAgB;CAqBzB"}
|
|
@@ -36,7 +36,7 @@ export { initOpenTelemetry, preloadOpenTelemetry } from './sdk/initOtel';
|
|
|
36
36
|
export { getAutoPerformanceIntegrations } from './integrations/tracing';
|
|
37
37
|
export { NodeOptions } from './types';
|
|
38
38
|
export { setOpenTelemetryContextAsyncContextStrategy as setNodeAsyncContextStrategy, } from '@sentry/opentelemetry';
|
|
39
|
-
export { addBreadcrumb, isInitialized, isEnabled, getGlobalScope, lastEventId, close, createTransport, flush, SDK_VERSION, getSpanStatusFromHttpCode, setHttpStatus, captureCheckIn, withMonitor, requestDataIntegration, functionToStringIntegration, inboundFiltersIntegration, eventFiltersIntegration, linkedErrorsIntegration, addEventProcessor, setContext, setExtra, setExtras, setTag, setTags, setUser, setConversationId, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, setCurrentClient, Scope, setMeasurement, getSpanDescendants, parameterize, getClient, getCurrentScope, getIsolationScope, getTraceData, getTraceMetaTags, httpHeadersToSpanAttributes, winterCGHeadersToDict, continueTrace, withScope, withIsolationScope, captureException, captureEvent, captureMessage, captureFeedback, captureConsoleIntegration, dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration, startSession, captureSession, endSession, addIntegration, startSpan, startSpanManual, startInactiveSpan, startNewTrace, suppressTracing, getActiveSpan, withActiveSpan, getRootSpan, spanToJSON, spanToTraceHeader, spanToBaggageHeader, trpcMiddleware, updateSpanName, supabaseIntegration, instrumentSupabaseClient, instrumentOpenAiClient, instrumentAnthropicAiClient, instrumentGoogleGenAIClient, zodErrorsIntegration, profiler, consoleLoggingIntegration, createConsolaReporter,
|
|
39
|
+
export { addBreadcrumb, isInitialized, isEnabled, getGlobalScope, lastEventId, close, createTransport, flush, SDK_VERSION, getSpanStatusFromHttpCode, setHttpStatus, captureCheckIn, withMonitor, requestDataIntegration, functionToStringIntegration, inboundFiltersIntegration, eventFiltersIntegration, linkedErrorsIntegration, addEventProcessor, setContext, setExtra, setExtras, setTag, setTags, setUser, setConversationId, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, setCurrentClient, Scope, setMeasurement, getSpanDescendants, parameterize, getClient, getCurrentScope, getIsolationScope, getTraceData, getTraceMetaTags, httpHeadersToSpanAttributes, winterCGHeadersToDict, continueTrace, withScope, withIsolationScope, captureException, captureEvent, captureMessage, captureFeedback, captureConsoleIntegration, dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration, startSession, captureSession, endSession, addIntegration, startSpan, startSpanManual, startInactiveSpan, startNewTrace, suppressTracing, getActiveSpan, withActiveSpan, getRootSpan, spanToJSON, spanToTraceHeader, spanToBaggageHeader, trpcMiddleware, updateSpanName, supabaseIntegration, instrumentSupabaseClient, instrumentOpenAiClient, instrumentAnthropicAiClient, instrumentGoogleGenAIClient, zodErrorsIntegration, profiler, consoleLoggingIntegration, createConsolaReporter, wrapMcpServerWithSentry, featureFlagsIntegration, spanStreamingIntegration, createLangChainCallbackHandler, instrumentLangChainEmbeddings, instrumentLangGraph, instrumentStateGraphCompile, } from '@sentry/core';
|
|
40
40
|
export { Breadcrumb, BreadcrumbHint, PolymorphicRequest, RequestEventData, SdkInfo, Event, EventHint, ErrorEvent, Exception, Session, SeverityLevel, StackFrame, Stacktrace, Thread, User, Span, Metric, Log, LogSeverityLevel, FeatureFlagsIntegration, ExclusiveEventHintOrCaptureContext, CaptureContext, } from '@sentry/core';
|
|
41
|
-
export { logger, metrics, httpServerIntegration, httpServerSpansIntegration, nodeContextIntegration, contextLinesIntegration, localVariablesIntegration, modulesIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, anrIntegration, disableAnrDetectionForCallback, spotlightIntegration, childProcessIntegration, processSessionIntegration, nodeRuntimeMetricsIntegration, NodeRuntimeMetricsOptions, pinoIntegration, createSentryWinstonTransport, SentryContextManager, systemErrorIntegration, generateInstrumentOnce, getSentryRelease, defaultStackParser, createGetModuleFromFilename, makeNodeTransport, NodeClient, cron, NODE_VERSION, validateOpenTelemetrySetup, withStreamedSpan, _INTERNAL_normalizeCollectionInterval } from '@sentry/node-core';
|
|
41
|
+
export { logger, metrics, httpServerIntegration, httpServerSpansIntegration, nodeContextIntegration, contextLinesIntegration, localVariablesIntegration, modulesIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, anrIntegration, disableAnrDetectionForCallback, spotlightIntegration, childProcessIntegration, processSessionIntegration, nodeRuntimeMetricsIntegration, NodeRuntimeMetricsOptions, consoleIntegration, pinoIntegration, createSentryWinstonTransport, SentryContextManager, systemErrorIntegration, generateInstrumentOnce, getSentryRelease, defaultStackParser, createGetModuleFromFilename, makeNodeTransport, NodeClient, cron, NODE_VERSION, validateOpenTelemetrySetup, withStreamedSpan, _INTERNAL_normalizeCollectionInterval } from '@sentry/node-core';
|
|
42
42
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UndiciInstrumentationConfig } from '
|
|
1
|
+
import { UndiciInstrumentationConfig } from './vendored/types';
|
|
2
2
|
interface NodeFetchOptions extends Pick<UndiciInstrumentationConfig, 'requestHook' | 'responseHook' | 'headersToSpanAttributes'> {
|
|
3
3
|
/**
|
|
4
4
|
* Whether breadcrumbs should be recorded for requests.
|
|
@@ -33,4 +33,4 @@ export declare const nativeNodeFetchIntegration: (options?: NodeFetchOptions | u
|
|
|
33
33
|
/** Exported only for tests. */
|
|
34
34
|
export declare function _getConfigWithDefaults(options?: Partial<NodeFetchOptions>): UndiciInstrumentationConfig;
|
|
35
35
|
export {};
|
|
36
|
-
//# sourceMappingURL=
|
|
36
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { UndiciRequest, UndiciResponse } from './types';
|
|
2
|
+
export interface ListenerRecord {
|
|
3
|
+
name: string;
|
|
4
|
+
unsubscribe: () => void;
|
|
5
|
+
}
|
|
6
|
+
export interface RequestMessage {
|
|
7
|
+
request: UndiciRequest;
|
|
8
|
+
}
|
|
9
|
+
export interface RequestHeadersMessage {
|
|
10
|
+
request: UndiciRequest;
|
|
11
|
+
socket: any;
|
|
12
|
+
}
|
|
13
|
+
export interface ResponseHeadersMessage {
|
|
14
|
+
request: UndiciRequest;
|
|
15
|
+
response: UndiciResponse;
|
|
16
|
+
}
|
|
17
|
+
export interface RequestTrailersMessage {
|
|
18
|
+
request: UndiciRequest;
|
|
19
|
+
response: UndiciResponse;
|
|
20
|
+
}
|
|
21
|
+
export interface RequestErrorMessage {
|
|
22
|
+
request: UndiciRequest;
|
|
23
|
+
error: Error;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=internal-types.d.ts.map
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { InstrumentationConfig } from '@opentelemetry/instrumentation';
|
|
2
|
+
import { Attributes, Span } from '@opentelemetry/api';
|
|
3
|
+
export interface UndiciRequest {
|
|
4
|
+
origin: string;
|
|
5
|
+
method: string;
|
|
6
|
+
path: string;
|
|
7
|
+
/**
|
|
8
|
+
* Serialized string of headers in the form `name: value\r\n` for v5
|
|
9
|
+
* Array of strings `[key1, value1, key2, value2]`, where values are
|
|
10
|
+
* `string | string[]` for v6
|
|
11
|
+
*/
|
|
12
|
+
headers: string | (string | string[])[];
|
|
13
|
+
/**
|
|
14
|
+
* Helper method to add headers (from v6)
|
|
15
|
+
*/
|
|
16
|
+
addHeader: (name: string, value: string) => void;
|
|
17
|
+
throwOnError: boolean;
|
|
18
|
+
completed: boolean;
|
|
19
|
+
aborted: boolean;
|
|
20
|
+
idempotent: boolean;
|
|
21
|
+
contentLength: number | null;
|
|
22
|
+
contentType: string | null;
|
|
23
|
+
body: any;
|
|
24
|
+
}
|
|
25
|
+
export interface UndiciResponse {
|
|
26
|
+
headers: Buffer[];
|
|
27
|
+
statusCode: number;
|
|
28
|
+
statusText: string;
|
|
29
|
+
}
|
|
30
|
+
export interface IgnoreRequestFunction<T = UndiciRequest> {
|
|
31
|
+
(request: T): boolean;
|
|
32
|
+
}
|
|
33
|
+
export interface RequestHookFunction<T = UndiciRequest> {
|
|
34
|
+
(span: Span, request: T): void;
|
|
35
|
+
}
|
|
36
|
+
export interface ResponseHookFunction<RequestType = UndiciRequest, ResponseType = UndiciResponse> {
|
|
37
|
+
(span: Span, info: {
|
|
38
|
+
request: RequestType;
|
|
39
|
+
response: ResponseType;
|
|
40
|
+
}): void;
|
|
41
|
+
}
|
|
42
|
+
export interface StartSpanHookFunction<T = UndiciRequest> {
|
|
43
|
+
(request: T): Attributes;
|
|
44
|
+
}
|
|
45
|
+
export interface UndiciInstrumentationConfig<RequestType = UndiciRequest, ResponseType = UndiciResponse> extends InstrumentationConfig {
|
|
46
|
+
/** Not trace all outgoing requests that matched with custom function */
|
|
47
|
+
ignoreRequestHook?: IgnoreRequestFunction<RequestType>;
|
|
48
|
+
/** Function for adding custom attributes before request is handled */
|
|
49
|
+
requestHook?: RequestHookFunction<RequestType>;
|
|
50
|
+
/** Function called once response headers have been received */
|
|
51
|
+
responseHook?: ResponseHookFunction<RequestType, ResponseType>;
|
|
52
|
+
/** Function for adding custom attributes before a span is started */
|
|
53
|
+
startSpanHook?: StartSpanHookFunction<RequestType>;
|
|
54
|
+
/** Require parent to create span for outgoing requests */
|
|
55
|
+
requireParentforSpans?: boolean;
|
|
56
|
+
/** Map the following HTTP headers to span attributes. */
|
|
57
|
+
headersToSpanAttributes?: {
|
|
58
|
+
requestHeaders?: string[];
|
|
59
|
+
responseHeaders?: string[];
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { InstrumentationBase } from '@opentelemetry/instrumentation';
|
|
2
|
+
import { UndiciInstrumentationConfig } from './types';
|
|
3
|
+
export declare class UndiciInstrumentation extends InstrumentationBase<UndiciInstrumentationConfig> {
|
|
4
|
+
private _channelSubs;
|
|
5
|
+
private _recordFromReq;
|
|
6
|
+
private _httpClientDurationHistogram;
|
|
7
|
+
constructor(config?: UndiciInstrumentationConfig);
|
|
8
|
+
protected init(): undefined;
|
|
9
|
+
disable(): void;
|
|
10
|
+
enable(): void;
|
|
11
|
+
protected _updateMetricInstruments(): void;
|
|
12
|
+
private subscribeToChannel;
|
|
13
|
+
private parseRequestHeaders;
|
|
14
|
+
private onRequestCreated;
|
|
15
|
+
private onRequestHeaders;
|
|
16
|
+
private onResponseHeaders;
|
|
17
|
+
private onDone;
|
|
18
|
+
private onError;
|
|
19
|
+
private recordRequestDuration;
|
|
20
|
+
private getRequestMethod;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=undici.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/node",
|
|
3
|
-
"version": "10.50.0
|
|
3
|
+
"version": "10.50.0",
|
|
4
4
|
"description": "Sentry Node SDK using OpenTelemetry for performance instrumentation",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/node",
|
|
@@ -88,14 +88,13 @@
|
|
|
88
88
|
"@opentelemetry/instrumentation-pg": "0.66.0",
|
|
89
89
|
"@opentelemetry/instrumentation-redis": "0.62.0",
|
|
90
90
|
"@opentelemetry/instrumentation-tedious": "0.33.0",
|
|
91
|
-
"@opentelemetry/instrumentation-undici": "0.24.0",
|
|
92
91
|
"@opentelemetry/sdk-trace-base": "^2.6.1",
|
|
93
92
|
"@opentelemetry/semantic-conventions": "^1.40.0",
|
|
94
93
|
"@prisma/instrumentation": "7.6.0",
|
|
95
94
|
"@fastify/otel": "0.18.0",
|
|
96
|
-
"@sentry/core": "10.50.0
|
|
97
|
-
"@sentry/node-core": "10.50.0
|
|
98
|
-
"@sentry/opentelemetry": "10.50.0
|
|
95
|
+
"@sentry/core": "10.50.0",
|
|
96
|
+
"@sentry/node-core": "10.50.0",
|
|
97
|
+
"@sentry/opentelemetry": "10.50.0",
|
|
99
98
|
"import-in-the-middle": "^3.0.0"
|
|
100
99
|
},
|
|
101
100
|
"devDependencies": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"node-fetch.js","sources":["../../../src/integrations/node-fetch.ts"],"sourcesContent":["import type { UndiciInstrumentationConfig } from '@opentelemetry/instrumentation-undici';\nimport { UndiciInstrumentation } from '@opentelemetry/instrumentation-undici';\nimport type { IntegrationFn } from '@sentry/core';\nimport {\n defineIntegration,\n getClient,\n hasSpansEnabled,\n SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n SEMANTIC_ATTRIBUTE_URL_FULL,\n stripDataUrlContent,\n} from '@sentry/core';\nimport type { NodeClient } from '@sentry/node-core';\nimport { generateInstrumentOnce, SentryNodeFetchInstrumentation } from '@sentry/node-core';\nimport type { NodeClientOptions } from '../types';\n\nconst INTEGRATION_NAME = 'NodeFetch';\n\ninterface NodeFetchOptions extends Pick<\n UndiciInstrumentationConfig,\n 'requestHook' | 'responseHook' | 'headersToSpanAttributes'\n> {\n /**\n * Whether breadcrumbs should be recorded for requests.\n * Defaults to true\n */\n breadcrumbs?: boolean;\n\n /**\n * If set to false, do not emit any spans.\n * This will ensure that the default UndiciInstrumentation from OpenTelemetry is not setup,\n * only the Sentry-specific instrumentation for breadcrumbs & trace propagation is applied.\n *\n * If `skipOpenTelemetrySetup: true` is configured, this defaults to `false`, otherwise it defaults to `true`.\n */\n spans?: boolean;\n\n /**\n * Whether to inject trace propagation headers (sentry-trace, baggage, traceparent) into outgoing fetch requests.\n *\n * When set to `false`, Sentry will not inject any trace propagation headers, but will still create breadcrumbs\n * (if `breadcrumbs` is enabled). This is useful when `skipOpenTelemetrySetup: true` is configured and you want\n * to avoid duplicate trace headers being injected by both Sentry and OpenTelemetry's UndiciInstrumentation.\n *\n * @default `true`\n */\n tracePropagation?: boolean;\n\n /**\n * Do not capture spans or breadcrumbs for outgoing fetch requests to URLs where the given callback returns `true`.\n * This controls both span & breadcrumb creation - spans will be non recording if tracing is disabled.\n */\n ignoreOutgoingRequests?: (url: string) => boolean;\n}\n\nconst instrumentOtelNodeFetch = generateInstrumentOnce(\n INTEGRATION_NAME,\n UndiciInstrumentation,\n (options: NodeFetchOptions) => {\n return _getConfigWithDefaults(options);\n },\n);\n\nconst instrumentSentryNodeFetch = generateInstrumentOnce(\n `${INTEGRATION_NAME}.sentry`,\n SentryNodeFetchInstrumentation,\n (options: NodeFetchOptions) => {\n return options;\n },\n);\n\nconst _nativeNodeFetchIntegration = ((options: NodeFetchOptions = {}) => {\n return {\n name: 'NodeFetch',\n setupOnce() {\n const instrumentSpans = _shouldInstrumentSpans(options, getClient<NodeClient>()?.getOptions());\n\n // This is the \"regular\" OTEL instrumentation that emits spans\n if (instrumentSpans) {\n instrumentOtelNodeFetch(options);\n }\n\n // This is the Sentry-specific instrumentation that creates breadcrumbs & propagates traces\n // This must be registered after the OTEL one, to ensure that the core trace propagation logic takes presedence\n // Otherwise, the sentry-trace header may be set multiple times\n instrumentSentryNodeFetch(options);\n },\n };\n}) satisfies IntegrationFn;\n\nexport const nativeNodeFetchIntegration = defineIntegration(_nativeNodeFetchIntegration);\n\n// Matching the behavior of the base instrumentation\nfunction getAbsoluteUrl(origin: string, path: string = '/'): string {\n const url = `${origin}`;\n\n if (url.endsWith('/') && path.startsWith('/')) {\n return `${url}${path.slice(1)}`;\n }\n\n if (!url.endsWith('/') && !path.startsWith('/')) {\n return `${url}/${path}`;\n }\n\n return `${url}${path}`;\n}\n\nfunction _shouldInstrumentSpans(options: NodeFetchOptions, clientOptions: Partial<NodeClientOptions> = {}): boolean {\n // If `spans` is passed in, it takes precedence\n // Else, we by default emit spans, unless `skipOpenTelemetrySetup` is set to `true` or spans are not enabled\n return typeof options.spans === 'boolean'\n ? options.spans\n : !clientOptions.skipOpenTelemetrySetup && hasSpansEnabled(clientOptions);\n}\n\n/** Exported only for tests. */\nexport function _getConfigWithDefaults(options: Partial<NodeFetchOptions> = {}): UndiciInstrumentationConfig {\n const instrumentationConfig = {\n requireParentforSpans: false,\n ignoreRequestHook: request => {\n const url = getAbsoluteUrl(request.origin, request.path);\n const _ignoreOutgoingRequests = options.ignoreOutgoingRequests;\n const shouldIgnore = _ignoreOutgoingRequests && url && _ignoreOutgoingRequests(url);\n\n return !!shouldIgnore;\n },\n startSpanHook: request => {\n const url = getAbsoluteUrl(request.origin, request.path);\n\n // Sanitize data URLs to prevent long base64 strings in span attributes\n if (url.startsWith('data:')) {\n const sanitizedUrl = stripDataUrlContent(url);\n return {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.otel.node_fetch',\n 'http.url': sanitizedUrl,\n [SEMANTIC_ATTRIBUTE_URL_FULL]: sanitizedUrl,\n [SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME]: `${request.method || 'GET'} ${sanitizedUrl}`,\n };\n }\n\n return {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.otel.node_fetch',\n };\n },\n requestHook: options.requestHook,\n responseHook: options.responseHook,\n headersToSpanAttributes: options.headersToSpanAttributes,\n } satisfies UndiciInstrumentationConfig;\n\n return instrumentationConfig;\n}\n"],"names":["generateInstrumentOnce","UndiciInstrumentation","SentryNodeFetchInstrumentation","getClient","defineIntegration","hasSpansEnabled","stripDataUrlContent","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","SEMANTIC_ATTRIBUTE_URL_FULL","SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME"],"mappings":";;;;;;AAgBA,MAAM,gBAAA,GAAmB,WAAW;;AAuCpC,MAAM,uBAAA,GAA0BA,+BAAsB;AACtD,EAAE,gBAAgB;AAClB,EAAEC,2CAAqB;AACvB,EAAE,CAAC,OAAO,KAAuB;AACjC,IAAI,OAAO,sBAAsB,CAAC,OAAO,CAAC;AAC1C,EAAE,CAAC;AACH,CAAC;;AAED,MAAM,yBAAA,GAA4BD,+BAAsB;AACxD,EAAE,CAAC,EAAA,gBAAA,CAAA,OAAA,CAAA;AACA,EAAAE,uCAAA;AACA,EAAA,CAAA,OAAA,KAAA;AACA,IAAA,OAAA,OAAA;AACA,EAAA,CAAA;AACA,CAAA;;AAEA,MAAA,2BAAA,IAAA,CAAA,OAAA,GAAA,EAAA,KAAA;AACA,EAAA,OAAA;AACA,IAAA,IAAA,EAAA,WAAA;AACA,IAAA,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AAA;AACA,IAAA,qBAAA,EAAA,KAAA;AACA,IAAA,iBAAA,EAAA,OAAA,IAAA;AACA,MAAA,MAAA,GAAA,GAAA,cAAA,CAAA,OAAA,CAAA,MAAA,EAAA,OAAA,CAAA,IAAA,CAAA;AACA,MAAA,MAAA,uBAAA,GAAA,OAAA,CAAA,sBAAA;AACA,MAAA,MAAA,YAAA,GAAA,uBAAA,IAAA,GAAA,IAAA,uBAAA,CAAA,GAAA,CAAA;;AAEA,MAAA,OAAA,CAAA,CAAA,YAAA;AACA,IAAA,CAAA;AACA,IAAA,aAAA,EAAA,OAAA,IAAA;AACA,MAAA,MAAA,GAAA,GAAA,cAAA,CAAA,OAAA,CAAA,MAAA,EAAA,OAAA,CAAA,IAAA,CAAA;;AAEA;AACA,MAAA,IAAA,GAAA,CAAA,UAAA,CAAA,OAAA,CAAA,EAAA;AACA,QAAA,MAAA,YAAA,GAAAC,wBAAA,CAAA,GAAA,CAAA;AACA,QAAA,OAAA;AACA,UAAA,CAAAC,qCAAA,GAAA,2BAAA;AACA,UAAA,UAAA,EAAA,YAAA;AACA,UAAA,CAAAC,gCAAA,GAAA,YAAA;AACA,UAAA,CAAAC,+CAAA,GAAA,CAAA,EAAA,OAAA,CAAA,MAAA,IAAA,KAAA,CAAA,CAAA,EAAA,YAAA,CAAA,CAAA;AACA,SAAA;AACA,MAAA;;AAEA,MAAA,OAAA;AACA,QAAA,CAAAF,qCAAA,GAAA,2BAAA;AACA,OAAA;AACA,IAAA,CAAA;AACA,IAAA,WAAA,EAAA,OAAA,CAAA,WAAA;AACA,IAAA,YAAA,EAAA,OAAA,CAAA,YAAA;AACA,IAAA,uBAAA,EAAA,OAAA,CAAA,uBAAA;AACA,GAAA;;AAEA,EAAA,OAAA,qBAAA;AACA;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"node-fetch.js","sources":["../../../src/integrations/node-fetch.ts"],"sourcesContent":["import type { UndiciInstrumentationConfig } from '@opentelemetry/instrumentation-undici';\nimport { UndiciInstrumentation } from '@opentelemetry/instrumentation-undici';\nimport type { IntegrationFn } from '@sentry/core';\nimport {\n defineIntegration,\n getClient,\n hasSpansEnabled,\n SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n SEMANTIC_ATTRIBUTE_URL_FULL,\n stripDataUrlContent,\n} from '@sentry/core';\nimport type { NodeClient } from '@sentry/node-core';\nimport { generateInstrumentOnce, SentryNodeFetchInstrumentation } from '@sentry/node-core';\nimport type { NodeClientOptions } from '../types';\n\nconst INTEGRATION_NAME = 'NodeFetch';\n\ninterface NodeFetchOptions extends Pick<\n UndiciInstrumentationConfig,\n 'requestHook' | 'responseHook' | 'headersToSpanAttributes'\n> {\n /**\n * Whether breadcrumbs should be recorded for requests.\n * Defaults to true\n */\n breadcrumbs?: boolean;\n\n /**\n * If set to false, do not emit any spans.\n * This will ensure that the default UndiciInstrumentation from OpenTelemetry is not setup,\n * only the Sentry-specific instrumentation for breadcrumbs & trace propagation is applied.\n *\n * If `skipOpenTelemetrySetup: true` is configured, this defaults to `false`, otherwise it defaults to `true`.\n */\n spans?: boolean;\n\n /**\n * Whether to inject trace propagation headers (sentry-trace, baggage, traceparent) into outgoing fetch requests.\n *\n * When set to `false`, Sentry will not inject any trace propagation headers, but will still create breadcrumbs\n * (if `breadcrumbs` is enabled). This is useful when `skipOpenTelemetrySetup: true` is configured and you want\n * to avoid duplicate trace headers being injected by both Sentry and OpenTelemetry's UndiciInstrumentation.\n *\n * @default `true`\n */\n tracePropagation?: boolean;\n\n /**\n * Do not capture spans or breadcrumbs for outgoing fetch requests to URLs where the given callback returns `true`.\n * This controls both span & breadcrumb creation - spans will be non recording if tracing is disabled.\n */\n ignoreOutgoingRequests?: (url: string) => boolean;\n}\n\nconst instrumentOtelNodeFetch = generateInstrumentOnce(\n INTEGRATION_NAME,\n UndiciInstrumentation,\n (options: NodeFetchOptions) => {\n return _getConfigWithDefaults(options);\n },\n);\n\nconst instrumentSentryNodeFetch = generateInstrumentOnce(\n `${INTEGRATION_NAME}.sentry`,\n SentryNodeFetchInstrumentation,\n (options: NodeFetchOptions) => {\n return options;\n },\n);\n\nconst _nativeNodeFetchIntegration = ((options: NodeFetchOptions = {}) => {\n return {\n name: 'NodeFetch',\n setupOnce() {\n const instrumentSpans = _shouldInstrumentSpans(options, getClient<NodeClient>()?.getOptions());\n\n // This is the \"regular\" OTEL instrumentation that emits spans\n if (instrumentSpans) {\n instrumentOtelNodeFetch(options);\n }\n\n // This is the Sentry-specific instrumentation that creates breadcrumbs & propagates traces\n // This must be registered after the OTEL one, to ensure that the core trace propagation logic takes presedence\n // Otherwise, the sentry-trace header may be set multiple times\n instrumentSentryNodeFetch(options);\n },\n };\n}) satisfies IntegrationFn;\n\nexport const nativeNodeFetchIntegration = defineIntegration(_nativeNodeFetchIntegration);\n\n// Matching the behavior of the base instrumentation\nfunction getAbsoluteUrl(origin: string, path: string = '/'): string {\n const url = `${origin}`;\n\n if (url.endsWith('/') && path.startsWith('/')) {\n return `${url}${path.slice(1)}`;\n }\n\n if (!url.endsWith('/') && !path.startsWith('/')) {\n return `${url}/${path}`;\n }\n\n return `${url}${path}`;\n}\n\nfunction _shouldInstrumentSpans(options: NodeFetchOptions, clientOptions: Partial<NodeClientOptions> = {}): boolean {\n // If `spans` is passed in, it takes precedence\n // Else, we by default emit spans, unless `skipOpenTelemetrySetup` is set to `true` or spans are not enabled\n return typeof options.spans === 'boolean'\n ? options.spans\n : !clientOptions.skipOpenTelemetrySetup && hasSpansEnabled(clientOptions);\n}\n\n/** Exported only for tests. */\nexport function _getConfigWithDefaults(options: Partial<NodeFetchOptions> = {}): UndiciInstrumentationConfig {\n const instrumentationConfig = {\n requireParentforSpans: false,\n ignoreRequestHook: request => {\n const url = getAbsoluteUrl(request.origin, request.path);\n const _ignoreOutgoingRequests = options.ignoreOutgoingRequests;\n const shouldIgnore = _ignoreOutgoingRequests && url && _ignoreOutgoingRequests(url);\n\n return !!shouldIgnore;\n },\n startSpanHook: request => {\n const url = getAbsoluteUrl(request.origin, request.path);\n\n // Sanitize data URLs to prevent long base64 strings in span attributes\n if (url.startsWith('data:')) {\n const sanitizedUrl = stripDataUrlContent(url);\n return {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.otel.node_fetch',\n 'http.url': sanitizedUrl,\n [SEMANTIC_ATTRIBUTE_URL_FULL]: sanitizedUrl,\n [SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME]: `${request.method || 'GET'} ${sanitizedUrl}`,\n };\n }\n\n return {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.otel.node_fetch',\n };\n },\n requestHook: options.requestHook,\n responseHook: options.responseHook,\n headersToSpanAttributes: options.headersToSpanAttributes,\n } satisfies UndiciInstrumentationConfig;\n\n return instrumentationConfig;\n}\n"],"names":[],"mappings":";;;;AAgBA,MAAM,gBAAA,GAAmB,WAAW;;AAuCpC,MAAM,uBAAA,GAA0B,sBAAsB;AACtD,EAAE,gBAAgB;AAClB,EAAE,qBAAqB;AACvB,EAAE,CAAC,OAAO,KAAuB;AACjC,IAAI,OAAO,sBAAsB,CAAC,OAAO,CAAC;AAC1C,EAAE,CAAC;AACH,CAAC;;AAED,MAAM,yBAAA,GAA4B,sBAAsB;AACxD,EAAE,CAAC,EAAA,gBAAA,CAAA,OAAA,CAAA;AACA,EAAA,8BAAA;AACA,EAAA,CAAA,OAAA,KAAA;AACA,IAAA,OAAA,OAAA;AACA,EAAA,CAAA;AACA,CAAA;;AAEA,MAAA,2BAAA,IAAA,CAAA,OAAA,GAAA,EAAA,KAAA;AACA,EAAA,OAAA;AACA,IAAA,IAAA,EAAA,WAAA;AACA,IAAA,SAAA,GAAA;AACA,MAAA,MAAA,eAAA,GAAA,sBAAA,CAAA,OAAA,EAAA,SAAA,EAAA,EAAA,UAAA,EAAA,CAAA;;AAEA;AACA,MAAA,I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