@sentry/node 10.11.0 → 10.13.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 +10 -7
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/integrations/http.js +24 -13
- package/build/cjs/integrations/http.js.map +1 -1
- package/build/cjs/integrations/tracing/anthropic-ai/index.js +2 -2
- package/build/cjs/integrations/tracing/anthropic-ai/index.js.map +1 -1
- package/build/cjs/integrations/tracing/anthropic-ai/instrumentation.js +6 -17
- package/build/cjs/integrations/tracing/anthropic-ai/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/connect.js +6 -1
- package/build/cjs/integrations/tracing/connect.js.map +1 -1
- package/build/cjs/integrations/tracing/express.js +1 -1
- package/build/cjs/integrations/tracing/express.js.map +1 -1
- package/build/cjs/integrations/tracing/fastify/index.js +1 -1
- package/build/cjs/integrations/tracing/fastify/index.js.map +1 -1
- package/build/cjs/integrations/tracing/firebase/otel/patches/firestore.js +3 -0
- package/build/cjs/integrations/tracing/firebase/otel/patches/firestore.js.map +1 -1
- package/build/cjs/integrations/tracing/google-genai/index.js +78 -0
- package/build/cjs/integrations/tracing/google-genai/index.js.map +1 -0
- package/build/cjs/integrations/tracing/google-genai/instrumentation.js +94 -0
- package/build/cjs/integrations/tracing/google-genai/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/hapi/index.js +1 -4
- package/build/cjs/integrations/tracing/hapi/index.js.map +1 -1
- package/build/cjs/integrations/tracing/index.js +3 -0
- package/build/cjs/integrations/tracing/index.js.map +1 -1
- package/build/cjs/integrations/tracing/koa.js +6 -1
- package/build/cjs/integrations/tracing/koa.js.map +1 -1
- package/build/cjs/integrations/tracing/openai/instrumentation.js +3 -3
- package/build/cjs/integrations/tracing/openai/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/prisma.js +117 -56
- package/build/cjs/integrations/tracing/prisma.js.map +1 -1
- package/build/cjs/integrations/tracing/vercelai/instrumentation.js +44 -46
- package/build/cjs/integrations/tracing/vercelai/instrumentation.js.map +1 -1
- package/build/cjs/sdk/initOtel.js +1 -35
- package/build/cjs/sdk/initOtel.js.map +1 -1
- package/build/esm/index.js +2 -1
- package/build/esm/index.js.map +1 -1
- package/build/esm/integrations/http.js +25 -14
- package/build/esm/integrations/http.js.map +1 -1
- package/build/esm/integrations/tracing/anthropic-ai/index.js +2 -2
- package/build/esm/integrations/tracing/anthropic-ai/index.js.map +1 -1
- package/build/esm/integrations/tracing/anthropic-ai/instrumentation.js +7 -18
- package/build/esm/integrations/tracing/anthropic-ai/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/connect.js +6 -1
- package/build/esm/integrations/tracing/connect.js.map +1 -1
- package/build/esm/integrations/tracing/express.js +1 -1
- package/build/esm/integrations/tracing/express.js.map +1 -1
- package/build/esm/integrations/tracing/fastify/index.js +1 -1
- package/build/esm/integrations/tracing/fastify/index.js.map +1 -1
- package/build/esm/integrations/tracing/firebase/otel/patches/firestore.js +3 -0
- package/build/esm/integrations/tracing/firebase/otel/patches/firestore.js.map +1 -1
- package/build/esm/integrations/tracing/google-genai/index.js +75 -0
- package/build/esm/integrations/tracing/google-genai/index.js.map +1 -0
- package/build/esm/integrations/tracing/google-genai/instrumentation.js +92 -0
- package/build/esm/integrations/tracing/google-genai/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/hapi/index.js +1 -4
- package/build/esm/integrations/tracing/hapi/index.js.map +1 -1
- package/build/esm/integrations/tracing/index.js +3 -0
- package/build/esm/integrations/tracing/index.js.map +1 -1
- package/build/esm/integrations/tracing/koa.js +6 -1
- package/build/esm/integrations/tracing/koa.js.map +1 -1
- package/build/esm/integrations/tracing/openai/instrumentation.js +4 -4
- package/build/esm/integrations/tracing/openai/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/prisma.js +117 -56
- package/build/esm/integrations/tracing/prisma.js.map +1 -1
- package/build/esm/integrations/tracing/vercelai/instrumentation.js +45 -47
- package/build/esm/integrations/tracing/vercelai/instrumentation.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/esm/sdk/initOtel.js +4 -36
- package/build/esm/sdk/initOtel.js.map +1 -1
- package/build/types/index.d.ts +2 -1
- package/build/types/index.d.ts.map +1 -1
- package/build/types/integrations/http.d.ts +2 -2
- package/build/types/integrations/http.d.ts.map +1 -1
- package/build/types/integrations/tracing/anthropic-ai/index.d.ts +1 -2
- package/build/types/integrations/tracing/anthropic-ai/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/anthropic-ai/instrumentation.d.ts +5 -6
- package/build/types/integrations/tracing/anthropic-ai/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/connect.d.ts.map +1 -1
- package/build/types/integrations/tracing/firebase/otel/patches/firestore.d.ts +4 -2
- package/build/types/integrations/tracing/firebase/otel/patches/firestore.d.ts.map +1 -1
- package/build/types/integrations/tracing/google-genai/index.d.ts +59 -0
- package/build/types/integrations/tracing/google-genai/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/google-genai/instrumentation.d.ts +20 -0
- package/build/types/integrations/tracing/google-genai/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/hapi/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/koa.d.ts.map +1 -1
- package/build/types/integrations/tracing/prisma.d.ts +9 -13
- package/build/types/integrations/tracing/prisma.d.ts.map +1 -1
- package/build/types/integrations/tracing/vercelai/instrumentation.d.ts.map +1 -1
- package/build/types/sdk/initOtel.d.ts +0 -2
- package/build/types/sdk/initOtel.d.ts.map +1 -1
- package/build/types-ts3.8/index.d.ts +2 -1
- package/build/types-ts3.8/integrations/http.d.ts +2 -2
- package/build/types-ts3.8/integrations/tracing/anthropic-ai/index.d.ts +1 -2
- package/build/types-ts3.8/integrations/tracing/anthropic-ai/instrumentation.d.ts +5 -6
- package/build/types-ts3.8/integrations/tracing/firebase/otel/patches/firestore.d.ts +4 -2
- package/build/types-ts3.8/integrations/tracing/google-genai/index.d.ts +59 -0
- package/build/types-ts3.8/integrations/tracing/google-genai/instrumentation.d.ts +20 -0
- package/build/types-ts3.8/integrations/tracing/prisma.d.ts +9 -13
- package/build/types-ts3.8/sdk/initOtel.d.ts +0 -2
- package/package.json +32 -32
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AA2BhD;;GAEG;AACH,wBAAgB,8BAA8B,IAAI,WAAW,EAAE,CA2B9D;AAED;;GAEG;AAEH,wBAAgB,wCAAwC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC,EAAE,CA8BzG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koa.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/koa.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAexE,UAAU,UAAU;IAClB;;OAEG;IACH,gBAAgB,CAAC,EAAE,KAAK,CAAC,YAAY,GAAG,QAAQ,CAAC,CAAC;CACnD;AAID,eAAO,MAAM,aAAa;;CAsCzB,CAAC;AAWF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,cAAc,0EAAqC,CAAC;AAEjE;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,eAAO,MAAM,oBAAoB;sBAA6B,GAAG,QAAQ,GAAG,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI;MAAK,
|
|
1
|
+
{"version":3,"file":"koa.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/koa.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAexE,UAAU,UAAU;IAClB;;OAEG;IACH,gBAAgB,CAAC,EAAE,KAAK,CAAC,YAAY,GAAG,QAAQ,CAAC,CAAC;CACnD;AAID,eAAO,MAAM,aAAa;;CAsCzB,CAAC;AAWF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,cAAc,0EAAqC,CAAC;AAEjE;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,eAAO,MAAM,oBAAoB;sBAA6B,GAAG,QAAQ,GAAG,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI;MAAK,IAgB3G,CAAC"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import type { Instrumentation } from '@opentelemetry/instrumentation';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
interface PrismaOptions {
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated This is no longer used, v5 works out of the box.
|
|
5
|
+
*/
|
|
6
|
+
prismaInstrumentation?: Instrumentation;
|
|
7
|
+
}
|
|
8
|
+
export declare const instrumentPrisma: ((options?: PrismaOptions | undefined) => Instrumentation<import("@opentelemetry/instrumentation").InstrumentationConfig>) & {
|
|
5
9
|
id: string;
|
|
6
10
|
};
|
|
7
11
|
/**
|
|
@@ -36,14 +40,6 @@ export declare const instrumentPrisma: ((options?: {
|
|
|
36
40
|
* }
|
|
37
41
|
* ```
|
|
38
42
|
*/
|
|
39
|
-
export declare const prismaIntegration: (
|
|
40
|
-
|
|
41
|
-
* Overrides the instrumentation used by the Sentry SDK with the passed in instrumentation instance.
|
|
42
|
-
*
|
|
43
|
-
* NOTE: By default, the Sentry SDK uses the Prisma v6 instrumentation. Use this option if you need performance instrumentation different Prisma versions.
|
|
44
|
-
*
|
|
45
|
-
* For more information refer to the documentation of `prismaIntegration()` or see https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/prisma/
|
|
46
|
-
*/
|
|
47
|
-
prismaInstrumentation?: Instrumentation<import("@opentelemetry/instrumentation").InstrumentationConfig> | undefined;
|
|
48
|
-
} | undefined) => import("@sentry/core").Integration;
|
|
43
|
+
export declare const prismaIntegration: (_options?: PrismaOptions | undefined) => import("@sentry/core").Integration;
|
|
44
|
+
export {};
|
|
49
45
|
//# sourceMappingURL=prisma.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prisma.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/prisma.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"prisma.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/prisma.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAqDtE,UAAU,aAAa;IACrB;;OAEG;IACH,qBAAqB,CAAC,EAAE,eAAe,CAAC;CACzC;AA2GD,eAAO,MAAM,gBAAgB;;CAE3B,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,iBAAiB,8EAgC5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentation.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/vercelai/instrumentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,+BAA+B,EAAE,MAAM,gCAAgC,CAAC;AAC7G,OAAO,EAAE,mBAAmB,EAAuC,MAAM,gCAAgC,CAAC;AAoC1G,UAAU,gBAAgB;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AA8FD;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CACxC,2BAA2B,EAAE,gBAAgB,GAAG,SAAS,EACzD,sBAAsB,EAAE,gBAAgB,EACxC,0BAA0B,EAAE,OAAO,GAAG,SAAS,EAC/C,uBAAuB,EAAE,OAAO,GAC/B;IAAE,YAAY,EAAE,OAAO,CAAC;IAAC,aAAa,EAAE,OAAO,CAAA;CAAE,CAoBnD;AAED;;;;;GAKG;AACH,qBAAa,6BAA8B,SAAQ,mBAAmB;IACpE,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,UAAU,CAAsB;gBAErB,MAAM,GAAE,qBAA0B;IAIrD;;OAEG;IACI,IAAI,IAAI,+BAA+B;IAK9C;;;OAGG;IACI,eAAe,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI;IAQlD;;OAEG;IACH,OAAO,CAAC,MAAM;
|
|
1
|
+
{"version":3,"file":"instrumentation.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/vercelai/instrumentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,+BAA+B,EAAE,MAAM,gCAAgC,CAAC;AAC7G,OAAO,EAAE,mBAAmB,EAAuC,MAAM,gCAAgC,CAAC;AAoC1G,UAAU,gBAAgB;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AA8FD;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CACxC,2BAA2B,EAAE,gBAAgB,GAAG,SAAS,EACzD,sBAAsB,EAAE,gBAAgB,EACxC,0BAA0B,EAAE,OAAO,GAAG,SAAS,EAC/C,uBAAuB,EAAE,OAAO,GAC/B;IAAE,YAAY,EAAE,OAAO,CAAC;IAAC,aAAa,EAAE,OAAO,CAAA;CAAE,CAoBnD;AAED;;;;;GAKG;AACH,qBAAa,6BAA8B,SAAQ,mBAAmB;IACpE,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,UAAU,CAAsB;gBAErB,MAAM,GAAE,qBAA0B;IAIrD;;OAEG;IACI,IAAI,IAAI,+BAA+B;IAK9C;;;OAGG;IACI,eAAe,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI;IAQlD;;OAEG;IACH,OAAO,CAAC,MAAM;CAuEf"}
|
|
@@ -9,8 +9,6 @@ interface AdditionalOpenTelemetryOptions {
|
|
|
9
9
|
* Initialize OpenTelemetry for Node.
|
|
10
10
|
*/
|
|
11
11
|
export declare function initOpenTelemetry(client: NodeClient, options?: AdditionalOpenTelemetryOptions): void;
|
|
12
|
-
/** Initialize the ESM loader. */
|
|
13
|
-
export declare function maybeInitializeEsmLoader(): void;
|
|
14
12
|
interface NodePreloadOptions {
|
|
15
13
|
debug?: boolean;
|
|
16
14
|
integrations?: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initOtel.d.ts","sourceRoot":"","sources":["../../../src/sdk/initOtel.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAOpE,OAAO,
|
|
1
|
+
{"version":3,"file":"initOtel.d.ts","sourceRoot":"","sources":["../../../src/sdk/initOtel.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAOpE,OAAO,EACL,KAAK,UAAU,EAIhB,MAAM,mBAAmB,CAAC;AAQ3B,UAAU,8BAA8B;IACtC,8DAA8D;IAC9D,cAAc,CAAC,EAAE,aAAa,EAAE,CAAC;CAClC;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,GAAE,8BAAmC,GAAG,IAAI,CAOxG;AAED,UAAU,kBAAkB;IAC1B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,GAAE,kBAAuB,GAAG,IAAI,CAiB3E;AAgBD,+BAA+B;AAC/B,wBAAgB,SAAS,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,GAAE,8BAAmC,GAAG,mBAAmB,CA2B/G;AAED,+BAA+B;AAC/B,wBAAgB,0BAA0B,CAAC,mBAAmB,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAiBtG"}
|
|
@@ -25,6 +25,7 @@ export { amqplibIntegration } from './integrations/tracing/amqplib';
|
|
|
25
25
|
export { vercelAIIntegration } from './integrations/tracing/vercelai';
|
|
26
26
|
export { openAIIntegration } from './integrations/tracing/openai';
|
|
27
27
|
export { anthropicAIIntegration } from './integrations/tracing/anthropic-ai';
|
|
28
|
+
export { googleGenAIIntegration } from './integrations/tracing/google-genai';
|
|
28
29
|
export { launchDarklyIntegration, buildLaunchDarklyFlagUsedHandler, openFeatureIntegration, OpenFeatureIntegrationHook, statsigIntegration, unleashIntegration, } from './integrations/featureFlagShims';
|
|
29
30
|
export { firebaseIntegration } from './integrations/tracing/firebase';
|
|
30
31
|
export { init, getDefaultIntegrations, getDefaultIntegrationsWithoutPerformance, initWithoutDefaultIntegrations, } from './sdk';
|
|
@@ -32,7 +33,7 @@ export { initOpenTelemetry, preloadOpenTelemetry } from './sdk/initOtel';
|
|
|
32
33
|
export { getAutoPerformanceIntegrations } from './integrations/tracing';
|
|
33
34
|
export { NodeOptions } from './types';
|
|
34
35
|
export { setOpenTelemetryContextAsyncContextStrategy as setNodeAsyncContextStrategy, } from '@sentry/opentelemetry';
|
|
35
|
-
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, 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, zodErrorsIntegration, profiler, consoleLoggingIntegration, consoleIntegration, wrapMcpServerWithSentry, featureFlagsIntegration, } from '@sentry/core';
|
|
36
|
+
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, 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, zodErrorsIntegration, profiler, consoleLoggingIntegration, createConsolaReporter, consoleIntegration, wrapMcpServerWithSentry, featureFlagsIntegration, } from '@sentry/core';
|
|
36
37
|
export { Breadcrumb, BreadcrumbHint, PolymorphicRequest, RequestEventData, SdkInfo, Event, EventHint, ErrorEvent, Exception, Session, SeverityLevel, StackFrame, Stacktrace, Thread, User, Span, FeatureFlagsIntegration, } from '@sentry/core';
|
|
37
38
|
export { logger, nodeContextIntegration, contextLinesIntegration, localVariablesIntegration, modulesIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, anrIntegration, disableAnrDetectionForCallback, spotlightIntegration, childProcessIntegration, createSentryWinstonTransport, SentryContextManager, systemErrorIntegration, generateInstrumentOnce, getSentryRelease, defaultStackParser, createGetModuleFromFilename, makeNodeTransport, NodeClient, cron, NODE_VERSION, validateOpenTelemetrySetup, } from '@sentry/node-core';
|
|
38
39
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -63,10 +63,10 @@ interface HttpOptions {
|
|
|
63
63
|
ignoreStaticAssets?: boolean;
|
|
64
64
|
/**
|
|
65
65
|
* Do not capture spans for incoming HTTP requests with the given status codes.
|
|
66
|
-
* By default, spans with
|
|
66
|
+
* By default, spans with some 3xx and 4xx status codes are ignored (see @default).
|
|
67
67
|
* Expects an array of status codes or a range of status codes, e.g. [[300,399], 404] would ignore 3xx and 404 status codes.
|
|
68
68
|
*
|
|
69
|
-
* @default `[[401, 404], [
|
|
69
|
+
* @default `[[401, 404], [301, 303], [305, 399]]`
|
|
70
70
|
*/
|
|
71
71
|
dropSpansForIncomingRequestStatusCodes?: (number | [
|
|
72
72
|
number,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AnthropicAiOptions } from '@sentry/core';
|
|
2
|
-
|
|
3
|
-
export declare const instrumentAnthropicAi: ((options?: unknown) => SentryAnthropicAiInstrumentation) & {
|
|
2
|
+
export declare const instrumentAnthropicAi: ((options?: AnthropicAiOptions | undefined) => import("@opentelemetry/instrumentation").Instrumentation<import("@opentelemetry/instrumentation").InstrumentationConfig>) & {
|
|
4
3
|
id: string;
|
|
5
4
|
};
|
|
6
5
|
/**
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { InstrumentationConfig, InstrumentationModuleDefinition, InstrumentationBase } from '@opentelemetry/instrumentation';
|
|
2
|
-
import { AnthropicAiOptions
|
|
3
|
-
|
|
4
|
-
options: AnthropicAiOptions;
|
|
5
|
-
}
|
|
2
|
+
import { AnthropicAiOptions } from '@sentry/core';
|
|
3
|
+
type AnthropicAiInstrumentationOptions = InstrumentationConfig & AnthropicAiOptions;
|
|
6
4
|
/**
|
|
7
5
|
* Sentry Anthropic AI instrumentation using OpenTelemetry.
|
|
8
6
|
*/
|
|
9
|
-
export declare class SentryAnthropicAiInstrumentation extends InstrumentationBase<
|
|
10
|
-
constructor(config?:
|
|
7
|
+
export declare class SentryAnthropicAiInstrumentation extends InstrumentationBase<AnthropicAiInstrumentationOptions> {
|
|
8
|
+
constructor(config?: AnthropicAiInstrumentationOptions);
|
|
11
9
|
/**
|
|
12
10
|
* Initializes the instrumentation by defining the modules to be patched.
|
|
13
11
|
*/
|
|
@@ -17,4 +15,5 @@ export declare class SentryAnthropicAiInstrumentation extends InstrumentationBas
|
|
|
17
15
|
*/
|
|
18
16
|
private _patch;
|
|
19
17
|
}
|
|
18
|
+
export {};
|
|
20
19
|
//# sourceMappingURL=instrumentation.d.ts.map
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Tracer } from '@opentelemetry/api';
|
|
2
2
|
import { InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';
|
|
3
|
-
import { unwrap as shimmerUnwrap, wrap as shimmerWrap } from 'shimmer';
|
|
4
3
|
import { FirebaseInstrumentationConfig, FirestoreSettings } from '../types';
|
|
4
|
+
type ShimmerWrap = (target: any, name: string, wrapper: (...args: any[]) => any) => void;
|
|
5
|
+
type ShimmerUnwrap = (target: any, name: string) => void;
|
|
5
6
|
/**
|
|
6
7
|
*
|
|
7
8
|
* @param tracer - Opentelemetry Tracer
|
|
@@ -9,7 +10,7 @@ import { FirebaseInstrumentationConfig, FirestoreSettings } from '../types';
|
|
|
9
10
|
* @param wrap - reference to native instrumentation wrap function
|
|
10
11
|
* @param unwrap - reference to native instrumentation wrap function
|
|
11
12
|
*/
|
|
12
|
-
export declare function patchFirestore(tracer: Tracer, firestoreSupportedVersions: string[], wrap:
|
|
13
|
+
export declare function patchFirestore(tracer: Tracer, firestoreSupportedVersions: string[], wrap: ShimmerWrap, unwrap: ShimmerUnwrap, config: FirebaseInstrumentationConfig): InstrumentationNodeModuleDefinition;
|
|
13
14
|
/**
|
|
14
15
|
* Gets the server address and port attributes from the Firestore settings.
|
|
15
16
|
* It's best effort to extract the address and port from the settings, especially for IPv6.
|
|
@@ -20,4 +21,5 @@ export declare function getPortAndAddress(settings: FirestoreSettings): {
|
|
|
20
21
|
address?: string;
|
|
21
22
|
port?: number;
|
|
22
23
|
};
|
|
24
|
+
export {};
|
|
23
25
|
//# sourceMappingURL=firestore.d.ts.map
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { GoogleGenAIOptions } from '@sentry/core';
|
|
2
|
+
export declare const instrumentGoogleGenAI: ((options?: GoogleGenAIOptions | undefined) => import("@opentelemetry/instrumentation").Instrumentation<import("@opentelemetry/instrumentation").InstrumentationConfig>) & {
|
|
3
|
+
id: string;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Adds Sentry tracing instrumentation for the Google Generative AI SDK.
|
|
7
|
+
*
|
|
8
|
+
* This integration is enabled by default.
|
|
9
|
+
*
|
|
10
|
+
* When configured, this integration automatically instruments Google GenAI SDK client instances
|
|
11
|
+
* to capture telemetry data following OpenTelemetry Semantic Conventions for Generative AI.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```javascript
|
|
15
|
+
* import * as Sentry from '@sentry/node';
|
|
16
|
+
*
|
|
17
|
+
* Sentry.init({
|
|
18
|
+
* integrations: [Sentry.googleGenAiIntegration()],
|
|
19
|
+
* });
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* ## Options
|
|
23
|
+
*
|
|
24
|
+
* - `recordInputs`: Whether to record prompt messages (default: respects `sendDefaultPii` client option)
|
|
25
|
+
* - `recordOutputs`: Whether to record response text (default: respects `sendDefaultPii` client option)
|
|
26
|
+
*
|
|
27
|
+
* ### Default Behavior
|
|
28
|
+
*
|
|
29
|
+
* By default, the integration will:
|
|
30
|
+
* - Record inputs and outputs ONLY if `sendDefaultPii` is set to `true` in your Sentry client options
|
|
31
|
+
* - Otherwise, inputs and outputs are NOT recorded unless explicitly enabled
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```javascript
|
|
35
|
+
* // Record inputs and outputs when sendDefaultPii is false
|
|
36
|
+
* Sentry.init({
|
|
37
|
+
* integrations: [
|
|
38
|
+
* Sentry.googleGenAiIntegration({
|
|
39
|
+
* recordInputs: true,
|
|
40
|
+
* recordOutputs: true
|
|
41
|
+
* })
|
|
42
|
+
* ],
|
|
43
|
+
* });
|
|
44
|
+
*
|
|
45
|
+
* // Never record inputs/outputs regardless of sendDefaultPii
|
|
46
|
+
* Sentry.init({
|
|
47
|
+
* sendDefaultPii: true,
|
|
48
|
+
* integrations: [
|
|
49
|
+
* Sentry.googleGenAiIntegration({
|
|
50
|
+
* recordInputs: false,
|
|
51
|
+
* recordOutputs: false
|
|
52
|
+
* })
|
|
53
|
+
* ],
|
|
54
|
+
* });
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
57
|
+
*/
|
|
58
|
+
export declare const googleGenAIIntegration: (options?: GoogleGenAIOptions | undefined) => import("@sentry/core").Integration;
|
|
59
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { InstrumentationConfig } from '@opentelemetry/instrumentation';
|
|
2
|
+
import { InstrumentationModuleDefinition, InstrumentationBase } from '@opentelemetry/instrumentation';
|
|
3
|
+
import { GoogleGenAIOptions } from '@sentry/core';
|
|
4
|
+
type GoogleGenAIInstrumentationOptions = GoogleGenAIOptions & InstrumentationConfig;
|
|
5
|
+
/**
|
|
6
|
+
* Sentry Google GenAI instrumentation using OpenTelemetry.
|
|
7
|
+
*/
|
|
8
|
+
export declare class SentryGoogleGenAiInstrumentation extends InstrumentationBase<GoogleGenAIInstrumentationOptions> {
|
|
9
|
+
constructor(config?: GoogleGenAIInstrumentationOptions);
|
|
10
|
+
/**
|
|
11
|
+
* Initializes the instrumentation by defining the modules to be patched.
|
|
12
|
+
*/
|
|
13
|
+
init(): InstrumentationModuleDefinition;
|
|
14
|
+
/**
|
|
15
|
+
* Core patch logic applying instrumentation to the Google GenAI client constructor.
|
|
16
|
+
*/
|
|
17
|
+
private _patch;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=instrumentation.d.ts.map
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { Instrumentation } from '@opentelemetry/instrumentation';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
interface PrismaOptions {
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated This is no longer used, v5 works out of the box.
|
|
5
|
+
*/
|
|
6
|
+
prismaInstrumentation?: Instrumentation;
|
|
7
|
+
}
|
|
8
|
+
export declare const instrumentPrisma: ((options?: PrismaOptions | undefined) => Instrumentation<import("@opentelemetry/instrumentation").InstrumentationConfig>) & {
|
|
5
9
|
id: string;
|
|
6
10
|
};
|
|
7
11
|
/**
|
|
@@ -36,14 +40,6 @@ export declare const instrumentPrisma: ((options?: {
|
|
|
36
40
|
* }
|
|
37
41
|
* ```
|
|
38
42
|
*/
|
|
39
|
-
export declare const prismaIntegration: (
|
|
40
|
-
|
|
41
|
-
* Overrides the instrumentation used by the Sentry SDK with the passed in instrumentation instance.
|
|
42
|
-
*
|
|
43
|
-
* NOTE: By default, the Sentry SDK uses the Prisma v6 instrumentation. Use this option if you need performance instrumentation different Prisma versions.
|
|
44
|
-
*
|
|
45
|
-
* For more information refer to the documentation of `prismaIntegration()` or see https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/prisma/
|
|
46
|
-
*/
|
|
47
|
-
prismaInstrumentation?: Instrumentation<import("@opentelemetry/instrumentation").InstrumentationConfig> | undefined;
|
|
48
|
-
} | undefined) => import("@sentry/core").Integration;
|
|
43
|
+
export declare const prismaIntegration: (_options?: PrismaOptions | undefined) => import("@sentry/core").Integration;
|
|
44
|
+
export {};
|
|
49
45
|
//# sourceMappingURL=prisma.d.ts.map
|
|
@@ -9,8 +9,6 @@ interface AdditionalOpenTelemetryOptions {
|
|
|
9
9
|
* Initialize OpenTelemetry for Node.
|
|
10
10
|
*/
|
|
11
11
|
export declare function initOpenTelemetry(client: NodeClient, options?: AdditionalOpenTelemetryOptions): void;
|
|
12
|
-
/** Initialize the ESM loader. */
|
|
13
|
-
export declare function maybeInitializeEsmLoader(): void;
|
|
14
12
|
interface NodePreloadOptions {
|
|
15
13
|
debug?: boolean;
|
|
16
14
|
integrations?: string[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/node",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.13.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",
|
|
@@ -66,38 +66,38 @@
|
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"@opentelemetry/api": "^1.9.0",
|
|
69
|
-
"@opentelemetry/context-async-hooks": "^2.
|
|
70
|
-
"@opentelemetry/core": "^2.
|
|
71
|
-
"@opentelemetry/instrumentation": "^0.
|
|
72
|
-
"@opentelemetry/instrumentation-amqplib": "0.
|
|
73
|
-
"@opentelemetry/instrumentation-connect": "0.
|
|
74
|
-
"@opentelemetry/instrumentation-dataloader": "0.
|
|
75
|
-
"@opentelemetry/instrumentation-express": "0.
|
|
76
|
-
"@opentelemetry/instrumentation-fs": "0.
|
|
77
|
-
"@opentelemetry/instrumentation-generic-pool": "0.
|
|
78
|
-
"@opentelemetry/instrumentation-graphql": "0.
|
|
79
|
-
"@opentelemetry/instrumentation-hapi": "0.
|
|
80
|
-
"@opentelemetry/instrumentation-http": "0.
|
|
69
|
+
"@opentelemetry/context-async-hooks": "^2.1.0",
|
|
70
|
+
"@opentelemetry/core": "^2.1.0",
|
|
71
|
+
"@opentelemetry/instrumentation": "^0.204.0",
|
|
72
|
+
"@opentelemetry/instrumentation-amqplib": "0.51.0",
|
|
73
|
+
"@opentelemetry/instrumentation-connect": "0.48.0",
|
|
74
|
+
"@opentelemetry/instrumentation-dataloader": "0.22.0",
|
|
75
|
+
"@opentelemetry/instrumentation-express": "0.53.0",
|
|
76
|
+
"@opentelemetry/instrumentation-fs": "0.24.0",
|
|
77
|
+
"@opentelemetry/instrumentation-generic-pool": "0.48.0",
|
|
78
|
+
"@opentelemetry/instrumentation-graphql": "0.52.0",
|
|
79
|
+
"@opentelemetry/instrumentation-hapi": "0.51.0",
|
|
80
|
+
"@opentelemetry/instrumentation-http": "0.204.0",
|
|
81
81
|
"@opentelemetry/instrumentation-ioredis": "0.52.0",
|
|
82
|
-
"@opentelemetry/instrumentation-kafkajs": "0.
|
|
83
|
-
"@opentelemetry/instrumentation-knex": "0.
|
|
84
|
-
"@opentelemetry/instrumentation-koa": "0.
|
|
85
|
-
"@opentelemetry/instrumentation-lru-memoizer": "0.
|
|
86
|
-
"@opentelemetry/instrumentation-mongodb": "0.
|
|
87
|
-
"@opentelemetry/instrumentation-mongoose": "0.
|
|
88
|
-
"@opentelemetry/instrumentation-mysql": "0.
|
|
89
|
-
"@opentelemetry/instrumentation-mysql2": "0.
|
|
90
|
-
"@opentelemetry/instrumentation-pg": "0.
|
|
91
|
-
"@opentelemetry/instrumentation-redis": "0.
|
|
92
|
-
"@opentelemetry/instrumentation-tedious": "0.
|
|
93
|
-
"@opentelemetry/instrumentation-undici": "0.
|
|
94
|
-
"@opentelemetry/resources": "^2.
|
|
95
|
-
"@opentelemetry/sdk-trace-base": "^2.
|
|
96
|
-
"@opentelemetry/semantic-conventions": "^1.
|
|
97
|
-
"@prisma/instrumentation": "6.
|
|
98
|
-
"@sentry/core": "10.
|
|
99
|
-
"@sentry/node-core": "10.
|
|
100
|
-
"@sentry/opentelemetry": "10.
|
|
82
|
+
"@opentelemetry/instrumentation-kafkajs": "0.14.0",
|
|
83
|
+
"@opentelemetry/instrumentation-knex": "0.49.0",
|
|
84
|
+
"@opentelemetry/instrumentation-koa": "0.52.0",
|
|
85
|
+
"@opentelemetry/instrumentation-lru-memoizer": "0.49.0",
|
|
86
|
+
"@opentelemetry/instrumentation-mongodb": "0.57.0",
|
|
87
|
+
"@opentelemetry/instrumentation-mongoose": "0.51.0",
|
|
88
|
+
"@opentelemetry/instrumentation-mysql": "0.50.0",
|
|
89
|
+
"@opentelemetry/instrumentation-mysql2": "0.51.0",
|
|
90
|
+
"@opentelemetry/instrumentation-pg": "0.57.0",
|
|
91
|
+
"@opentelemetry/instrumentation-redis": "0.53.0",
|
|
92
|
+
"@opentelemetry/instrumentation-tedious": "0.23.0",
|
|
93
|
+
"@opentelemetry/instrumentation-undici": "0.15.0",
|
|
94
|
+
"@opentelemetry/resources": "^2.1.0",
|
|
95
|
+
"@opentelemetry/sdk-trace-base": "^2.1.0",
|
|
96
|
+
"@opentelemetry/semantic-conventions": "^1.37.0",
|
|
97
|
+
"@prisma/instrumentation": "6.15.0",
|
|
98
|
+
"@sentry/core": "10.13.0",
|
|
99
|
+
"@sentry/node-core": "10.13.0",
|
|
100
|
+
"@sentry/opentelemetry": "10.13.0",
|
|
101
101
|
"import-in-the-middle": "^1.14.2",
|
|
102
102
|
"minimatch": "^9.0.0"
|
|
103
103
|
},
|