@sentry/core 10.50.0-alpha.0 → 10.51.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/client.js +27 -12
- package/build/cjs/client.js.map +1 -1
- package/build/cjs/envelope.js +4 -1
- package/build/cjs/envelope.js.map +1 -1
- package/build/cjs/index.js +10 -5
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/instrument/console.js +4 -3
- package/build/cjs/instrument/console.js.map +1 -1
- package/build/cjs/instrument/fetch.js +6 -2
- package/build/cjs/instrument/fetch.js.map +1 -1
- package/build/cjs/instrument/handlers.js +11 -1
- package/build/cjs/instrument/handlers.js.map +1 -1
- package/build/cjs/integrations/console.js +3 -1
- package/build/cjs/integrations/console.js.map +1 -1
- package/build/cjs/integrations/extraerrordata.js +2 -2
- package/build/cjs/integrations/extraerrordata.js.map +1 -1
- package/build/cjs/integrations/postgresjs.js +10 -1
- package/build/cjs/integrations/postgresjs.js.map +1 -1
- package/build/cjs/integrations/requestdata.js +9 -5
- package/build/cjs/integrations/requestdata.js.map +1 -1
- package/build/cjs/integrations/supabase.js +39 -12
- package/build/cjs/integrations/supabase.js.map +1 -1
- package/build/cjs/logs/console-integration.js +3 -1
- package/build/cjs/logs/console-integration.js.map +1 -1
- package/build/cjs/server-runtime-client.js +20 -2
- package/build/cjs/server-runtime-client.js.map +1 -1
- package/build/cjs/tracing/ai/gen-ai-attributes.js +6 -0
- package/build/cjs/tracing/ai/gen-ai-attributes.js.map +1 -1
- package/build/cjs/tracing/ai/utils.js +4 -4
- package/build/cjs/tracing/ai/utils.js.map +1 -1
- package/build/cjs/tracing/idleSpan.js +7 -1
- package/build/cjs/tracing/idleSpan.js.map +1 -1
- package/build/cjs/tracing/langchain/index.js +43 -8
- package/build/cjs/tracing/langchain/index.js.map +1 -1
- package/build/cjs/tracing/langchain/utils.js +44 -10
- package/build/cjs/tracing/langchain/utils.js.map +1 -1
- package/build/cjs/tracing/langgraph/index.js +105 -2
- package/build/cjs/tracing/langgraph/index.js.map +1 -1
- package/build/cjs/tracing/langgraph/utils.js +168 -0
- package/build/cjs/tracing/langgraph/utils.js.map +1 -1
- package/build/cjs/tracing/sentrySpan.js +0 -5
- package/build/cjs/tracing/sentrySpan.js.map +1 -1
- package/build/cjs/tracing/spans/captureSpan.js +125 -0
- package/build/cjs/tracing/spans/captureSpan.js.map +1 -1
- package/build/cjs/tracing/spans/envelope.js +13 -3
- package/build/cjs/tracing/spans/envelope.js.map +1 -1
- package/build/cjs/tracing/trace.js +1 -0
- package/build/cjs/tracing/trace.js.map +1 -1
- package/build/cjs/tracing/vercel-ai/index.js +0 -9
- package/build/cjs/tracing/vercel-ai/index.js.map +1 -1
- package/build/cjs/trpc.js +2 -3
- package/build/cjs/trpc.js.map +1 -1
- package/build/cjs/utils/isSentryRequestUrl.js +9 -1
- package/build/cjs/utils/isSentryRequestUrl.js.map +1 -1
- package/build/cjs/utils/normalizationHints.js +38 -0
- package/build/cjs/utils/normalizationHints.js.map +1 -0
- package/build/cjs/utils/normalize.js +7 -11
- package/build/cjs/utils/normalize.js.map +1 -1
- package/build/cjs/utils/object.js +1 -1
- package/build/cjs/utils/object.js.map +1 -1
- package/build/cjs/utils/request.js +63 -12
- package/build/cjs/utils/request.js.map +1 -1
- package/build/cjs/utils/should-ignore-span.js +27 -8
- package/build/cjs/utils/should-ignore-span.js.map +1 -1
- package/build/cjs/utils/version.js +1 -1
- package/build/cjs/utils/version.js.map +1 -1
- package/build/esm/client.js +27 -12
- package/build/esm/client.js.map +1 -1
- package/build/esm/envelope.js +4 -1
- package/build/esm/envelope.js.map +1 -1
- package/build/esm/index.js +3 -2
- package/build/esm/index.js.map +1 -1
- package/build/esm/instrument/console.js +4 -3
- package/build/esm/instrument/console.js.map +1 -1
- package/build/esm/instrument/fetch.js +6 -2
- package/build/esm/instrument/fetch.js.map +1 -1
- package/build/esm/instrument/handlers.js +11 -1
- package/build/esm/instrument/handlers.js.map +1 -1
- package/build/esm/integrations/console.js +3 -1
- package/build/esm/integrations/console.js.map +1 -1
- package/build/esm/integrations/extraerrordata.js +2 -2
- package/build/esm/integrations/extraerrordata.js.map +1 -1
- package/build/esm/integrations/postgresjs.js +10 -1
- package/build/esm/integrations/postgresjs.js.map +1 -1
- package/build/esm/integrations/requestdata.js +9 -5
- package/build/esm/integrations/requestdata.js.map +1 -1
- package/build/esm/integrations/supabase.js +39 -12
- package/build/esm/integrations/supabase.js.map +1 -1
- package/build/esm/logs/console-integration.js +3 -1
- package/build/esm/logs/console-integration.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/esm/server-runtime-client.js +20 -2
- package/build/esm/server-runtime-client.js.map +1 -1
- package/build/esm/tracing/ai/gen-ai-attributes.js +6 -1
- package/build/esm/tracing/ai/gen-ai-attributes.js.map +1 -1
- package/build/esm/tracing/ai/utils.js +4 -4
- package/build/esm/tracing/ai/utils.js.map +1 -1
- package/build/esm/tracing/idleSpan.js +7 -1
- package/build/esm/tracing/idleSpan.js.map +1 -1
- package/build/esm/tracing/langchain/index.js +45 -10
- package/build/esm/tracing/langchain/index.js.map +1 -1
- package/build/esm/tracing/langchain/utils.js +44 -12
- package/build/esm/tracing/langchain/utils.js.map +1 -1
- package/build/esm/tracing/langgraph/index.js +107 -5
- package/build/esm/tracing/langgraph/index.js.map +1 -1
- package/build/esm/tracing/langgraph/utils.js +166 -2
- package/build/esm/tracing/langgraph/utils.js.map +1 -1
- package/build/esm/tracing/sentrySpan.js +0 -5
- package/build/esm/tracing/sentrySpan.js.map +1 -1
- package/build/esm/tracing/spans/captureSpan.js +126 -2
- package/build/esm/tracing/spans/captureSpan.js.map +1 -1
- package/build/esm/tracing/spans/envelope.js +13 -3
- package/build/esm/tracing/spans/envelope.js.map +1 -1
- package/build/esm/tracing/trace.js +1 -0
- package/build/esm/tracing/trace.js.map +1 -1
- package/build/esm/tracing/vercel-ai/index.js +0 -9
- package/build/esm/tracing/vercel-ai/index.js.map +1 -1
- package/build/esm/trpc.js +2 -3
- package/build/esm/trpc.js.map +1 -1
- package/build/esm/utils/isSentryRequestUrl.js +9 -1
- package/build/esm/utils/isSentryRequestUrl.js.map +1 -1
- package/build/esm/utils/normalizationHints.js +33 -0
- package/build/esm/utils/normalizationHints.js.map +1 -0
- package/build/esm/utils/normalize.js +7 -11
- package/build/esm/utils/normalize.js.map +1 -1
- package/build/esm/utils/object.js +1 -1
- package/build/esm/utils/object.js.map +1 -1
- package/build/esm/utils/request.js +63 -12
- package/build/esm/utils/request.js.map +1 -1
- package/build/esm/utils/should-ignore-span.js +27 -8
- package/build/esm/utils/should-ignore-span.js.map +1 -1
- package/build/esm/utils/version.js +1 -1
- package/build/esm/utils/version.js.map +1 -1
- package/build/types/client.d.ts +12 -1
- package/build/types/client.d.ts.map +1 -1
- package/build/types/envelope.d.ts.map +1 -1
- package/build/types/index.d.ts +6 -3
- package/build/types/index.d.ts.map +1 -1
- package/build/types/instrument/console.d.ts +2 -1
- package/build/types/instrument/console.d.ts.map +1 -1
- package/build/types/instrument/fetch.d.ts +4 -2
- package/build/types/instrument/fetch.d.ts.map +1 -1
- package/build/types/instrument/handlers.d.ts +2 -2
- package/build/types/instrument/handlers.d.ts.map +1 -1
- package/build/types/integrations/console.d.ts.map +1 -1
- package/build/types/integrations/postgresjs.d.ts.map +1 -1
- package/build/types/integrations/supabase.d.ts.map +1 -1
- package/build/types/logs/console-integration.d.ts.map +1 -1
- package/build/types/server-runtime-client.d.ts +5 -0
- package/build/types/server-runtime-client.d.ts.map +1 -1
- package/build/types/tracing/ai/utils.d.ts +1 -3
- package/build/types/tracing/ai/utils.d.ts.map +1 -1
- package/build/types/tracing/google-genai/types.d.ts +5 -2
- package/build/types/tracing/google-genai/types.d.ts.map +1 -1
- package/build/types/tracing/idleSpan.d.ts.map +1 -1
- package/build/types/tracing/langchain/index.d.ts.map +1 -1
- package/build/types/tracing/langchain/types.d.ts +8 -0
- package/build/types/tracing/langchain/types.d.ts.map +1 -1
- package/build/types/tracing/langchain/utils.d.ts +2 -0
- package/build/types/tracing/langchain/utils.d.ts.map +1 -1
- package/build/types/tracing/langgraph/index.d.ts +4 -0
- package/build/types/tracing/langgraph/index.d.ts.map +1 -1
- package/build/types/tracing/langgraph/utils.d.ts +18 -2
- package/build/types/tracing/langgraph/utils.d.ts.map +1 -1
- package/build/types/tracing/sentrySpan.d.ts.map +1 -1
- package/build/types/tracing/spans/captureSpan.d.ts +10 -0
- package/build/types/tracing/spans/captureSpan.d.ts.map +1 -1
- package/build/types/tracing/spans/envelope.d.ts.map +1 -1
- package/build/types/tracing/vercel-ai/index.d.ts.map +1 -1
- package/build/types/trpc.d.ts.map +1 -1
- package/build/types/types-hoist/envelope.d.ts +1 -1
- package/build/types/types-hoist/envelope.d.ts.map +1 -1
- package/build/types/types-hoist/feedback/config.d.ts +20 -0
- package/build/types/types-hoist/feedback/config.d.ts.map +1 -1
- package/build/types/types-hoist/feedback/index.d.ts +2 -2
- package/build/types/types-hoist/feedback/index.d.ts.map +1 -1
- package/build/types/types-hoist/feedback/sendFeedback.d.ts +3 -0
- package/build/types/types-hoist/feedback/sendFeedback.d.ts.map +1 -1
- package/build/types/types-hoist/options.d.ts +37 -2
- package/build/types/types-hoist/options.d.ts.map +1 -1
- package/build/types/types-hoist/span.d.ts +5 -0
- package/build/types/types-hoist/span.d.ts.map +1 -1
- package/build/types/utils/normalizationHints.d.ts +9 -0
- package/build/types/utils/normalizationHints.d.ts.map +1 -0
- package/build/types/utils/normalize.d.ts.map +1 -1
- package/build/types/utils/object.d.ts +1 -1
- package/build/types/utils/object.d.ts.map +1 -1
- package/build/types/utils/request.d.ts.map +1 -1
- package/build/types/utils/should-ignore-span.d.ts +3 -1
- package/build/types/utils/should-ignore-span.d.ts.map +1 -1
- package/build/types-ts3.8/client.d.ts +12 -1
- package/build/types-ts3.8/index.d.ts +6 -3
- package/build/types-ts3.8/instrument/console.d.ts +2 -1
- package/build/types-ts3.8/instrument/fetch.d.ts +4 -2
- package/build/types-ts3.8/instrument/handlers.d.ts +2 -2
- package/build/types-ts3.8/server-runtime-client.d.ts +5 -0
- package/build/types-ts3.8/tracing/ai/utils.d.ts +1 -3
- package/build/types-ts3.8/tracing/google-genai/types.d.ts +5 -2
- package/build/types-ts3.8/tracing/langchain/types.d.ts +8 -0
- package/build/types-ts3.8/tracing/langchain/utils.d.ts +2 -0
- package/build/types-ts3.8/tracing/langgraph/index.d.ts +4 -0
- package/build/types-ts3.8/tracing/langgraph/utils.d.ts +18 -2
- package/build/types-ts3.8/tracing/spans/captureSpan.d.ts +10 -0
- package/build/types-ts3.8/types-hoist/envelope.d.ts +1 -1
- package/build/types-ts3.8/types-hoist/feedback/config.d.ts +20 -0
- package/build/types-ts3.8/types-hoist/feedback/index.d.ts +2 -2
- package/build/types-ts3.8/types-hoist/feedback/sendFeedback.d.ts +3 -0
- package/build/types-ts3.8/types-hoist/options.d.ts +37 -2
- package/build/types-ts3.8/types-hoist/span.d.ts +5 -0
- package/build/types-ts3.8/utils/normalizationHints.d.ts +9 -0
- package/build/types-ts3.8/utils/object.d.ts +1 -1
- package/build/types-ts3.8/utils/should-ignore-span.d.ts +3 -1
- package/package.json +1 -1
- package/build/cjs/tracing/spans/extractGenAiSpans.js +0 -50
- package/build/cjs/tracing/spans/extractGenAiSpans.js.map +0 -1
- package/build/cjs/tracing/spans/spanJsonToStreamedSpan.js +0 -26
- package/build/cjs/tracing/spans/spanJsonToStreamedSpan.js.map +0 -1
- package/build/esm/tracing/spans/extractGenAiSpans.js +0 -48
- package/build/esm/tracing/spans/extractGenAiSpans.js.map +0 -1
- package/build/esm/tracing/spans/spanJsonToStreamedSpan.js +0 -24
- package/build/esm/tracing/spans/spanJsonToStreamedSpan.js.map +0 -1
- package/build/types/tracing/spans/extractGenAiSpans.d.ts +0 -15
- package/build/types/tracing/spans/extractGenAiSpans.d.ts.map +0 -1
- package/build/types/tracing/spans/spanJsonToStreamedSpan.d.ts +0 -6
- package/build/types/tracing/spans/spanJsonToStreamedSpan.d.ts.map +0 -1
- package/build/types-ts3.8/tracing/spans/extractGenAiSpans.d.ts +0 -15
- package/build/types-ts3.8/tracing/spans/spanJsonToStreamedSpan.d.ts +0 -6
|
@@ -22,7 +22,7 @@ export declare function fill(source: {
|
|
|
22
22
|
* @param name The name of the property to be set
|
|
23
23
|
* @param value The value to which to set the property
|
|
24
24
|
*/
|
|
25
|
-
export declare function addNonEnumerableProperty(obj: object, name: string, value: unknown): void;
|
|
25
|
+
export declare function addNonEnumerableProperty(obj: object, name: string | symbol, value: unknown): void;
|
|
26
26
|
/**
|
|
27
27
|
* Remembers the original function on the wrapped function and
|
|
28
28
|
* patches up the prototype.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../../../src/utils/object.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAKtE;;;;;;;;;;;;GAYG;AAEH,wBAAgB,IAAI,CAAC,MAAM,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,EAAE,IAAI,EAAE,MAAM,EAAE,kBAAkB,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,GAAG,IAAI,CAyBpH;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../../../src/utils/object.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAKtE;;;;;;;;;;;;GAYG;AAEH,wBAAgB,IAAI,CAAC,MAAM,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,EAAE,IAAI,EAAE,MAAM,EAAE,kBAAkB,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,GAAG,IAAI,CAyBpH;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAWjG;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,eAAe,GAAG,IAAI,CAM7F;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,CAAC,EACjE,GAAG,EAAE,CAAC,EACN,KAAK,EAAE,CAAC,EACR,OAAO,EAAE,eAAe,EACxB,UAAU,GAAE,OAAc,GACzB,IAAI,CAeN;AAED;;;;;;GAMG;AAEH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,QAAQ,EAAE,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,SAAS,CAE/F;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAC5C;IACE,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,GACD;IACE,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GACD,CAAC,CA8BJ;AAmBD;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAKzF;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,GAAG,CAAC,CAQrD;AAsDD;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,MAAM,CA2BrD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../src/utils/request.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAEnF;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,eAAe,EAAE,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAc9F;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAc/G;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,eAAe,GAAG,gBAAgB,CAUnF;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE;IAChD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE;QACR,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC;KAC9C,CAAC;IACF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE;QACP,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB,CAAC;CACH,GAAG,gBAAgB,CAkCnB;
|
|
1
|
+
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../src/utils/request.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAEnF;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,eAAe,EAAE,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAc9F;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAc/G;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,eAAe,GAAG,gBAAgB,CAUnF;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE;IAChD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE;QACR,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC;KAC9C,CAAC;IACF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE;QACP,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB,CAAC;CACH,GAAG,gBAAgB,CAkCnB;AAmFD;;;;;;;;;;;;GAYG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,EACtD,cAAc,GAAE,OAAe,EAC/B,SAAS,GAAE,SAAS,GAAG,UAAsB,GAC5C,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAoDxB;AAgED,4CAA4C;AAC5C,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAczE"}
|
|
@@ -3,7 +3,9 @@ import type { SpanJSON } from '../types-hoist/span';
|
|
|
3
3
|
/**
|
|
4
4
|
* Check if a span should be ignored based on the ignoreSpans configuration.
|
|
5
5
|
*/
|
|
6
|
-
export declare function shouldIgnoreSpan(span: Pick<SpanJSON, 'description' | 'op'
|
|
6
|
+
export declare function shouldIgnoreSpan(span: Pick<SpanJSON, 'description' | 'op'> & {
|
|
7
|
+
attributes?: Record<string, unknown>;
|
|
8
|
+
}, ignoreSpans: Required<ClientOptions>['ignoreSpans']): boolean;
|
|
7
9
|
/**
|
|
8
10
|
* Takes a list of spans, and a span that was dropped, and re-parents the child spans of the dropped span to the parent of the dropped span, if possible.
|
|
9
11
|
* This mutates the spans array in place!
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"should-ignore-span.d.ts","sourceRoot":"","sources":["../../../src/utils/should-ignore-span.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"should-ignore-span.d.ts","sourceRoot":"","sources":["../../../src/utils/should-ignore-span.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAA4B,MAAM,wBAAwB,CAAC;AACtF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAQpD;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI,CAAC,GAAG;IAAE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,EACrF,WAAW,EAAE,QAAQ,CAAC,aAAa,CAAC,CAAC,aAAa,CAAC,GAClD,OAAO,CAsCT;AAeD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAe9E"}
|
|
@@ -604,10 +604,21 @@ export declare abstract class Client<O extends ClientOptions = ClientOptions> {
|
|
|
604
604
|
* Send an envelope to Sentry.
|
|
605
605
|
*/
|
|
606
606
|
sendEnvelope(envelope: Envelope): PromiseLike<TransportMakeRequestResponse>;
|
|
607
|
+
/**
|
|
608
|
+
* Register a cleanup function to be called when the client is disposed.
|
|
609
|
+
* This is useful for integrations that need to clean up global state.
|
|
610
|
+
*
|
|
611
|
+
* NOTE: This is a no-op in the base `Client` class. Subclasses like `ServerRuntimeClient`
|
|
612
|
+
* override this method to actually register and execute cleanup callbacks.
|
|
613
|
+
*/
|
|
614
|
+
registerCleanup(callback: () => void): void;
|
|
607
615
|
/**
|
|
608
616
|
* Disposes of the client and releases all resources.
|
|
609
617
|
*
|
|
610
|
-
* Subclasses should override this method to clean up their own resources
|
|
618
|
+
* Subclasses should override this method to clean up their own resources, including invoking
|
|
619
|
+
* any callbacks registered via {@link Client.registerCleanup}. The base implementation is a
|
|
620
|
+
* no-op and does NOT execute registered cleanup callbacks.
|
|
621
|
+
*
|
|
611
622
|
* After calling dispose(), the client should not be used anymore.
|
|
612
623
|
*/
|
|
613
624
|
dispose(): void;
|
|
@@ -33,6 +33,7 @@ export { createCheckInEnvelope } from './checkin';
|
|
|
33
33
|
export { hasSpansEnabled } from './utils/hasSpansEnabled';
|
|
34
34
|
export { withStreamedSpan } from './tracing/spans/beforeSendSpan';
|
|
35
35
|
export { isStreamedBeforeSendSpanCallback } from './tracing/spans/beforeSendSpan';
|
|
36
|
+
export { safeSetSpanJSONAttributes } from './tracing/spans/captureSpan';
|
|
36
37
|
export { isSentryRequestUrl } from './utils/isSentryRequestUrl';
|
|
37
38
|
export { handleCallbackErrors } from './utils/handleCallbackErrors';
|
|
38
39
|
export { parameterize, fmt } from './utils/parameterize';
|
|
@@ -102,12 +103,13 @@ export { GoogleGenAIResponse } from './tracing/google-genai/types';
|
|
|
102
103
|
export { createLangChainCallbackHandler, instrumentLangChainEmbeddings } from './tracing/langchain';
|
|
103
104
|
export { LANGCHAIN_INTEGRATION_NAME } from './tracing/langchain/constants';
|
|
104
105
|
export { LangChainOptions, LangChainIntegration } from './tracing/langchain/types';
|
|
105
|
-
export { instrumentStateGraphCompile, instrumentLangGraph } from './tracing/langgraph';
|
|
106
|
+
export { instrumentStateGraphCompile, instrumentCreateReactAgent, instrumentLangGraph } from './tracing/langgraph';
|
|
106
107
|
export { LANGGRAPH_INTEGRATION_NAME } from './tracing/langgraph/constants';
|
|
107
108
|
export { LangGraphOptions, LangGraphIntegration, CompiledGraph } from './tracing/langgraph/types';
|
|
108
109
|
export { OpenAiClient, OpenAiOptions, InstrumentedMethod } from './tracing/openai/types';
|
|
109
110
|
export { AnthropicAiClient, AnthropicAiOptions, AnthropicAiInstrumentedMethod, AnthropicAiResponse, } from './tracing/anthropic-ai/types';
|
|
110
|
-
export { GoogleGenAIClient, GoogleGenAIChat, GoogleGenAIOptions,
|
|
111
|
+
export { GoogleGenAIClient, GoogleGenAIChat, GoogleGenAIOptions, GoogleGenAIInstrumentedMethod, } from './tracing/google-genai/types';
|
|
112
|
+
export { GoogleGenAIIstrumentedMethod } from './tracing/google-genai/types';
|
|
111
113
|
export { SpanBuffer } from './tracing/spans/spanBuffer';
|
|
112
114
|
export { hasSpanStreamingEnabled } from './tracing/spans/hasSpanStreamingEnabled';
|
|
113
115
|
export { spanStreamingIntegration } from './integrations/spanStreaming';
|
|
@@ -132,6 +134,7 @@ export { SentryDebugLogger } from './utils/debug-logger';
|
|
|
132
134
|
export { addContextToFrame, addExceptionMechanism, addExceptionTypeValue, checkOrSetAlreadyCaught, isAlreadyCaptured, getEventDescription, parseSemver, uuid4, } from './utils/misc';
|
|
133
135
|
export { isNodeEnv, loadModule } from './utils/node';
|
|
134
136
|
export { normalize, normalizeToSize, normalizeUrlToBase } from './utils/normalize';
|
|
137
|
+
export { setNormalizationDepthOverrideHint, setSkipNormalizationHint } from './utils/normalizationHints';
|
|
135
138
|
export { addNonEnumerableProperty, convertToPlainObject, dropUndefinedKeys, extractExceptionKeysForMessage, fill, getOriginalFunction, markFunctionWrapped, objectify, } from './utils/object';
|
|
136
139
|
export { basename, dirname, isAbsolute, join, normalizePath, relative, resolve } from './utils/path';
|
|
137
140
|
export { makePromiseBuffer, SENTRY_BUFFER_FULL_ERROR } from './utils/promisebuffer';
|
|
@@ -184,7 +187,7 @@ export { Package } from './types-hoist/package';
|
|
|
184
187
|
export { PolymorphicEvent, PolymorphicRequest } from './types-hoist/polymorphics';
|
|
185
188
|
export { ThreadId, FrameId, StackId, ThreadCpuSample, ThreadCpuStack, ThreadCpuFrame, ThreadCpuProfile, ContinuousThreadCpuProfile, Profile, ProfileChunk, } from './types-hoist/profiling';
|
|
186
189
|
export { ReplayEndEvent, ReplayEvent, ReplayRecordingData, ReplayRecordingMode, ReplayStartEvent, ReplayStopReason, } from './types-hoist/replay';
|
|
187
|
-
export { FeedbackEvent, FeedbackFormData, FeedbackInternalOptions, FeedbackModalIntegration, FeedbackScreenshotIntegration, SendFeedback, SendFeedbackParams, UserFeedback, } from './types-hoist/feedback';
|
|
190
|
+
export { FeedbackErrorCode, FeedbackErrorMessages, FeedbackEvent, FeedbackFormData, FeedbackInternalOptions, FeedbackModalIntegration, FeedbackScreenshotIntegration, SendFeedback, SendFeedbackParams, UserFeedback, } from './types-hoist/feedback';
|
|
188
191
|
export { QueryParams, RequestEventData, RequestHookInfo, ResponseHookInfo, SanitizedRequestData, } from './types-hoist/request';
|
|
189
192
|
export { Runtime } from './types-hoist/runtime';
|
|
190
193
|
export { SdkInfo } from './types-hoist/sdkinfo';
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { HandlerDataConsole } from '../types-hoist/instrument';
|
|
2
2
|
/**
|
|
3
3
|
* Add an instrumentation handler for when a console.xxx method is called.
|
|
4
|
+
* Returns a function to remove the handler.
|
|
4
5
|
*
|
|
5
6
|
* Use at your own risk, this might break without changelog notice, only used internally.
|
|
6
7
|
* @hidden
|
|
7
8
|
*/
|
|
8
|
-
export declare function addConsoleInstrumentationHandler(handler: (data: HandlerDataConsole) => void): void;
|
|
9
|
+
export declare function addConsoleInstrumentationHandler(handler: (data: HandlerDataConsole) => void): () => void;
|
|
9
10
|
//# sourceMappingURL=console.d.ts.map
|
|
@@ -3,20 +3,22 @@ import { HandlerDataFetch } from '../types-hoist/instrument';
|
|
|
3
3
|
* Add an instrumentation handler for when a fetch request happens.
|
|
4
4
|
* The handler function is called once when the request starts and once when it ends,
|
|
5
5
|
* which can be identified by checking if it has an `endTimestamp`.
|
|
6
|
+
* Returns a function to remove the handler.
|
|
6
7
|
*
|
|
7
8
|
* Use at your own risk, this might break without changelog notice, only used internally.
|
|
8
9
|
* @hidden
|
|
9
10
|
*/
|
|
10
|
-
export declare function addFetchInstrumentationHandler(handler: (data: HandlerDataFetch) => void, skipNativeFetchCheck?: boolean): void;
|
|
11
|
+
export declare function addFetchInstrumentationHandler(handler: (data: HandlerDataFetch) => void, skipNativeFetchCheck?: boolean): () => void;
|
|
11
12
|
/**
|
|
12
13
|
* Add an instrumentation handler for long-lived fetch requests, like consuming server-sent events (SSE) via fetch.
|
|
13
14
|
* The handler will resolve the request body and emit the actual `endTimestamp`, so that the
|
|
14
15
|
* span can be updated accordingly.
|
|
16
|
+
* Returns a function to remove the handler.
|
|
15
17
|
*
|
|
16
18
|
* Only used internally
|
|
17
19
|
* @hidden
|
|
18
20
|
*/
|
|
19
|
-
export declare function addFetchEndInstrumentationHandler(handler: (data: HandlerDataFetch) => void): void;
|
|
21
|
+
export declare function addFetchEndInstrumentationHandler(handler: (data: HandlerDataFetch) => void): () => void;
|
|
20
22
|
/**
|
|
21
23
|
* Parses the fetch arguments to find the used Http method and the url of the request.
|
|
22
24
|
* Exported for tests only.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type InstrumentHandlerType = 'console' | 'dom' | 'fetch' | 'fetch-body-resolved' | 'history' | 'xhr' | 'error' | 'unhandledrejection';
|
|
2
2
|
export type InstrumentHandlerCallback = (data: any) => void;
|
|
3
|
-
/** Add a handler function. */
|
|
4
|
-
export declare function addHandler(type: InstrumentHandlerType, handler: InstrumentHandlerCallback): void;
|
|
3
|
+
/** Add a handler function. Returns a function to remove the handler. */
|
|
4
|
+
export declare function addHandler(type: InstrumentHandlerType, handler: InstrumentHandlerCallback): () => void;
|
|
5
5
|
/**
|
|
6
6
|
* Reset all instrumentation handlers.
|
|
7
7
|
* This can be used by tests to ensure we have a clean slate of instrumentation handlers.
|
|
@@ -18,6 +18,7 @@ export interface ServerRuntimeClientOptions extends ClientOptions<BaseTransportO
|
|
|
18
18
|
* The Sentry Server Runtime Client SDK.
|
|
19
19
|
*/
|
|
20
20
|
export declare class ServerRuntimeClient<O extends ClientOptions & ServerRuntimeClientOptions = ServerRuntimeClientOptions> extends Client<O> {
|
|
21
|
+
private _disposeCallbacks;
|
|
21
22
|
/**
|
|
22
23
|
* Creates a new Edge SDK instance.
|
|
23
24
|
* @param options Configuration options for this SDK.
|
|
@@ -47,6 +48,10 @@ export declare class ServerRuntimeClient<O extends ClientOptions & ServerRuntime
|
|
|
47
48
|
* to create a monitor automatically when sending a check in.
|
|
48
49
|
*/
|
|
49
50
|
captureCheckIn(checkIn: CheckIn, monitorConfig?: MonitorConfig, scope?: Scope): string;
|
|
51
|
+
/**
|
|
52
|
+
* @inheritDoc
|
|
53
|
+
*/
|
|
54
|
+
registerCleanup(callback: () => void): void;
|
|
50
55
|
/**
|
|
51
56
|
* Disposes of the client and releases all resources.
|
|
52
57
|
*
|
|
@@ -29,9 +29,7 @@ export declare function resolveAIRecordingOptions<T extends AIRecordingOptions>(
|
|
|
29
29
|
/**
|
|
30
30
|
* Resolves whether truncation should be enabled.
|
|
31
31
|
* If the user explicitly set `enableTruncation`, that value is used.
|
|
32
|
-
* Otherwise, truncation
|
|
33
|
-
* spans (either via span streaming or extraction from the legacy transaction),
|
|
34
|
-
* so the legacy transaction size cap that motivated truncation no longer applies.
|
|
32
|
+
* Otherwise, truncation is disabled when span streaming is active.
|
|
35
33
|
*/
|
|
36
34
|
export declare function shouldEnableTruncation(enableTruncation: boolean | undefined): boolean;
|
|
37
35
|
/**
|
|
@@ -170,10 +170,13 @@ export interface GoogleGenAIChat {
|
|
|
170
170
|
sendMessage: (...args: unknown[]) => Promise<GenerateContentResponse>;
|
|
171
171
|
sendMessageStream: (...args: unknown[]) => Promise<AsyncGenerator<GenerateContentResponse, any, unknown>>;
|
|
172
172
|
}
|
|
173
|
+
export type GoogleGenAIInstrumentedMethod = keyof typeof GOOGLE_GENAI_METHOD_REGISTRY;
|
|
173
174
|
/**
|
|
174
|
-
* @deprecated
|
|
175
|
+
* @deprecated Use {@link GoogleGenAIInstrumentedMethod} instead. This alias
|
|
176
|
+
* preserves backwards compatibility with the misspelled name and will be
|
|
177
|
+
* removed in the next major version.
|
|
175
178
|
*/
|
|
176
|
-
export type GoogleGenAIIstrumentedMethod =
|
|
179
|
+
export type GoogleGenAIIstrumentedMethod = GoogleGenAIInstrumentedMethod;
|
|
177
180
|
export type GoogleGenAIResponse = GenerateContentResponse;
|
|
178
181
|
export {};
|
|
179
182
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -32,6 +32,14 @@ export interface LangChainSerialized {
|
|
|
32
32
|
graph?: Record<string, unknown>;
|
|
33
33
|
kwargs?: Record<string, unknown>;
|
|
34
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* Subset of the 'llm' param passed to createReactAgent
|
|
37
|
+
*/
|
|
38
|
+
export interface BaseChatModel {
|
|
39
|
+
lc_namespace: string[];
|
|
40
|
+
modelName?: string;
|
|
41
|
+
model?: string;
|
|
42
|
+
}
|
|
35
43
|
/**
|
|
36
44
|
* LangChain message structure
|
|
37
45
|
* Supports both regular messages and LangChain serialized format
|
|
@@ -57,4 +57,6 @@ export declare function extractChatModelRequestAttributes(llm: LangChainSerializ
|
|
|
57
57
|
* `stop_reason` (for providers that use it).
|
|
58
58
|
*/
|
|
59
59
|
export declare function extractLlmResponseAttributes(llmResult: LangChainLLMResult, recordOutputs: boolean): Record<string, SpanAttributeValue> | undefined;
|
|
60
|
+
export declare function getAgentNameFromMetadata(metadata?: Record<string, unknown>): Record<string, SpanAttributeValue>;
|
|
61
|
+
export declare function extractToolDefinitions(extraParams?: Record<string, unknown>): string | undefined;
|
|
60
62
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -8,6 +8,10 @@ import { CompiledGraph, LangGraphOptions } from './types';
|
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
10
|
export declare function instrumentStateGraphCompile(originalCompile: (...args: unknown[]) => CompiledGraph, options: LangGraphOptions): (...args: unknown[]) => CompiledGraph;
|
|
11
|
+
/**
|
|
12
|
+
* Instruments createReactAgent to create invoke_agent and execute_tool spans.
|
|
13
|
+
*/
|
|
14
|
+
export declare function instrumentCreateReactAgent(originalCreateReactAgent: (...args: unknown[]) => CompiledGraph, options?: LangGraphOptions): (...args: unknown[]) => CompiledGraph;
|
|
11
15
|
/**
|
|
12
16
|
* Directly instruments a StateGraph instance to add tracing spans
|
|
13
17
|
*
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
import { Span } from '../../types-hoist/span';
|
|
2
|
-
import { LangChainMessage } from '../langchain/types';
|
|
3
|
-
import { CompiledGraph } from './types';
|
|
2
|
+
import { BaseChatModel, LangChainMessage } from '../langchain/types';
|
|
3
|
+
import { CompiledGraph, LangGraphOptions } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* Extract LLM model object from createReactAgent params
|
|
6
|
+
*/
|
|
7
|
+
export declare function extractLLMFromParams(args: unknown[]): BaseChatModel | null;
|
|
8
|
+
/**
|
|
9
|
+
* Extract agent name from createReactAgent params
|
|
10
|
+
*/
|
|
11
|
+
export declare function extractAgentNameFromParams(args: unknown[]): string | null;
|
|
12
|
+
/**
|
|
13
|
+
* Wraps an array of LangChain tools so each invocation creates a gen_ai.execute_tool span.
|
|
14
|
+
*
|
|
15
|
+
* Wraps each tool's invoke() method in place. A marker prevents double-wrapping.
|
|
16
|
+
*/
|
|
17
|
+
export declare function wrapToolsWithSpans(tools: unknown[], options: LangGraphOptions, agentName?: string): unknown[];
|
|
4
18
|
/**
|
|
5
19
|
* Extract tool calls from messages
|
|
6
20
|
*/
|
|
@@ -28,4 +42,6 @@ export declare function extractToolsFromCompiledGraph(compiledGraph: CompiledGra
|
|
|
28
42
|
* Set response attributes on the span
|
|
29
43
|
*/
|
|
30
44
|
export declare function setResponseAttributes(span: Span, inputMessages: LangChainMessage[] | null, result: unknown): void;
|
|
45
|
+
/** Merge `sentryHandler` into a langchain `callbacks` value (`BaseCallbackHandler[]` or `BaseCallbackManager`). */
|
|
46
|
+
export declare function mergeSentryCallback(existing: unknown, sentryHandler: unknown): unknown;
|
|
31
47
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -23,4 +23,14 @@ export declare function applyBeforeSendSpanCallback(span: StreamedSpanJSON, befo
|
|
|
23
23
|
* If an attribute already exists, it will not be overwritten.
|
|
24
24
|
*/
|
|
25
25
|
export declare function safeSetSpanJSONAttributes(spanJSON: StreamedSpanJSON, newAttributes: RawAttributes<Record<string, unknown>>): void;
|
|
26
|
+
/**
|
|
27
|
+
* Infer and backfill span data from OTel semantic conventions.
|
|
28
|
+
* This mirrors what the `SentrySpanExporter` does for non-streamed spans via `getSpanData`/`inferSpanData`.
|
|
29
|
+
* Streamed spans skip the exporter, so we do the inference here during capture.
|
|
30
|
+
*
|
|
31
|
+
* Backfills: `sentry.op`, `sentry.source`, and `name` (description).
|
|
32
|
+
* Uses `safeSetSpanJSONAttributes` so explicitly set attributes are never overwritten.
|
|
33
|
+
*/
|
|
34
|
+
/** Exported only for tests. */
|
|
35
|
+
export declare function inferSpanDataFromOtelAttributes(spanJSON: StreamedSpanJSON, spanKind?: number): void;
|
|
26
36
|
//# sourceMappingURL=captureSpan.d.ts.map
|
|
@@ -160,7 +160,7 @@ type StreamedSpanEnvelopeHeaders = BaseEnvelopeHeaders & {
|
|
|
160
160
|
};
|
|
161
161
|
type LogEnvelopeHeaders = BaseEnvelopeHeaders;
|
|
162
162
|
type MetricEnvelopeHeaders = BaseEnvelopeHeaders;
|
|
163
|
-
export type EventEnvelope = BaseEnvelope<EventEnvelopeHeaders, EventItem | AttachmentItem | UserFeedbackItem | FeedbackItem | ProfileItem
|
|
163
|
+
export type EventEnvelope = BaseEnvelope<EventEnvelopeHeaders, EventItem | AttachmentItem | UserFeedbackItem | FeedbackItem | ProfileItem>;
|
|
164
164
|
export type SessionEnvelope = BaseEnvelope<SessionEnvelopeHeaders, SessionItem>;
|
|
165
165
|
export type ClientReportEnvelope = BaseEnvelope<ClientReportEnvelopeHeaders, ClientReportItem>;
|
|
166
166
|
export type ReplayEnvelope = [
|
|
@@ -159,6 +159,26 @@ export interface FeedbackTextConfiguration {
|
|
|
159
159
|
* The label for the button that removed a highlight/hidden section of the screenshot.
|
|
160
160
|
*/
|
|
161
161
|
removeHighlightText: string;
|
|
162
|
+
/**
|
|
163
|
+
* Error text shown when feedback submission is attempted with an empty message
|
|
164
|
+
*/
|
|
165
|
+
errorEmptyMessageText: string;
|
|
166
|
+
/**
|
|
167
|
+
* Error text shown when the Sentry client is not set up
|
|
168
|
+
*/
|
|
169
|
+
errorNoClientText: string;
|
|
170
|
+
/**
|
|
171
|
+
* Error text shown when the feedback submission times out (after 30s)
|
|
172
|
+
*/
|
|
173
|
+
errorTimeoutText: string;
|
|
174
|
+
/**
|
|
175
|
+
* Error text shown when the feedback submission is blocked because the domain is not allowed (HTTP 403)
|
|
176
|
+
*/
|
|
177
|
+
errorForbiddenText: string;
|
|
178
|
+
/**
|
|
179
|
+
* Error text shown when the feedback submission fails for any other reason (e.g. network error, ad-blocker)
|
|
180
|
+
*/
|
|
181
|
+
errorGenericText: string;
|
|
162
182
|
}
|
|
163
183
|
/**
|
|
164
184
|
* The public callbacks available for the feedback integration
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Attachment } from '../attachment';
|
|
2
2
|
import { Integration } from '../integration';
|
|
3
3
|
import { FeedbackCallbacks, FeedbackGeneralConfiguration, FeedbackTextConfiguration, FeedbackThemeConfiguration } from './config';
|
|
4
|
-
import { FeedbackEvent, SendFeedback, SendFeedbackParams, UserFeedback } from './sendFeedback';
|
|
4
|
+
import { FeedbackErrorCode, FeedbackErrorMessages, FeedbackEvent, SendFeedback, SendFeedbackParams, UserFeedback } from './sendFeedback';
|
|
5
5
|
export { FeedbackFormData } from './form';
|
|
6
|
-
export {
|
|
6
|
+
export { FeedbackErrorCode, FeedbackErrorMessages, FeedbackEvent, SendFeedback, SendFeedbackParams, UserFeedback };
|
|
7
7
|
/**
|
|
8
8
|
* The integration's internal `options` member where every value should be set
|
|
9
9
|
*/
|
|
@@ -43,8 +43,11 @@ export interface SendFeedbackParams {
|
|
|
43
43
|
[key: string]: Primitive;
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
|
+
export type FeedbackErrorCode = 'ERROR_EMPTY_MESSAGE' | 'ERROR_NO_CLIENT' | 'ERROR_TIMEOUT' | 'ERROR_FORBIDDEN' | 'ERROR_GENERIC';
|
|
47
|
+
export type FeedbackErrorMessages = Partial<Record<FeedbackErrorCode, string>>;
|
|
46
48
|
export type SendFeedback = (params: SendFeedbackParams, hint?: EventHint & {
|
|
47
49
|
includeReplay?: boolean;
|
|
50
|
+
errorMessages?: FeedbackErrorMessages;
|
|
48
51
|
}) => Promise<string>;
|
|
49
52
|
export {};
|
|
50
53
|
//# sourceMappingURL=sendFeedback.d.ts.map
|
|
@@ -90,9 +90,16 @@ export interface ServerRuntimeOptions {
|
|
|
90
90
|
*/
|
|
91
91
|
onFatalError?(this: void, error: Error): void;
|
|
92
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* Allowed attribute value matchers in `ignoreSpans` filters.
|
|
95
|
+
* String span attributes use pattern matching (substring or RegExp).
|
|
96
|
+
* Non-string attribute values match by strict equality (arrays element-wise).
|
|
97
|
+
*/
|
|
98
|
+
export type IgnoreSpanAttributeValue = string | boolean | number | string[] | boolean[] | number[] | RegExp;
|
|
93
99
|
/**
|
|
94
100
|
* A filter object for ignoring spans.
|
|
95
|
-
* At least one of the properties (`op
|
|
101
|
+
* At least one of the properties (`name`, `op`, or `attributes`) must be set.
|
|
102
|
+
* If multiple are set, all must match for the span to be ignored.
|
|
96
103
|
*/
|
|
97
104
|
type IgnoreSpanFilter = {
|
|
98
105
|
/**
|
|
@@ -103,6 +110,12 @@ type IgnoreSpanFilter = {
|
|
|
103
110
|
* Spans with an op matching this pattern will be ignored.
|
|
104
111
|
*/
|
|
105
112
|
op?: string | RegExp;
|
|
113
|
+
/**
|
|
114
|
+
* Spans whose attributes ALL match the corresponding entries will be ignored.
|
|
115
|
+
* String attribute values are matched as patterns (substring or RegExp).
|
|
116
|
+
* Non-string values match by strict equality (arrays element-wise).
|
|
117
|
+
*/
|
|
118
|
+
attributes?: Record<string, IgnoreSpanAttributeValue>;
|
|
106
119
|
} | {
|
|
107
120
|
/**
|
|
108
121
|
* Spans with a name matching this pattern will be ignored.
|
|
@@ -112,6 +125,27 @@ type IgnoreSpanFilter = {
|
|
|
112
125
|
* Spans with an op matching this pattern will be ignored.
|
|
113
126
|
*/
|
|
114
127
|
op: string | RegExp;
|
|
128
|
+
/**
|
|
129
|
+
* Spans whose attributes ALL match the corresponding entries will be ignored.
|
|
130
|
+
* String attribute values are matched as patterns (substring or RegExp).
|
|
131
|
+
* Non-string values match by strict equality (arrays element-wise).
|
|
132
|
+
*/
|
|
133
|
+
attributes?: Record<string, IgnoreSpanAttributeValue>;
|
|
134
|
+
} | {
|
|
135
|
+
/**
|
|
136
|
+
* Spans with a name matching this pattern will be ignored.
|
|
137
|
+
*/
|
|
138
|
+
name?: string | RegExp;
|
|
139
|
+
/**
|
|
140
|
+
* Spans with an op matching this pattern will be ignored.
|
|
141
|
+
*/
|
|
142
|
+
op?: string | RegExp;
|
|
143
|
+
/**
|
|
144
|
+
* Spans whose attributes ALL match the corresponding entries will be ignored.
|
|
145
|
+
* String attribute values are matched as patterns (substring or RegExp).
|
|
146
|
+
* Non-string values match by strict equality (arrays element-wise).
|
|
147
|
+
*/
|
|
148
|
+
attributes: Record<string, IgnoreSpanAttributeValue>;
|
|
115
149
|
};
|
|
116
150
|
export interface ClientOptions<TO extends BaseTransportOptions = BaseTransportOptions> {
|
|
117
151
|
/**
|
|
@@ -291,7 +325,8 @@ export interface ClientOptions<TO extends BaseTransportOptions = BaseTransportOp
|
|
|
291
325
|
* A list of span names or patterns to ignore.
|
|
292
326
|
*
|
|
293
327
|
* If you specify a pattern {@link IgnoreSpanFilter}, at least one
|
|
294
|
-
* of the properties (`op
|
|
328
|
+
* of the properties (`name`, `op`, or `attributes`) must be set.
|
|
329
|
+
* When multiple properties are set, all must match for the span to be ignored.
|
|
295
330
|
*
|
|
296
331
|
* @default []
|
|
297
332
|
*/
|
|
@@ -50,6 +50,11 @@ export type SerializedStreamedSpan = Pick<StreamedSpanJSON, Exclude<keyof Stream
|
|
|
50
50
|
* Envelope span item container.
|
|
51
51
|
*/
|
|
52
52
|
export type SerializedStreamedSpanContainer = {
|
|
53
|
+
version?: number;
|
|
54
|
+
ingest_settings?: {
|
|
55
|
+
infer_ip?: 'auto' | 'never';
|
|
56
|
+
infer_user_agent?: 'auto' | 'never';
|
|
57
|
+
};
|
|
53
58
|
items: Array<SerializedStreamedSpan>;
|
|
54
59
|
};
|
|
55
60
|
/** A JSON representation of a span. */
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Marks an object so `normalize` returns it unchanged (already-normalized SDK data). */
|
|
2
|
+
export declare function setSkipNormalizationHint(obj: object): void;
|
|
3
|
+
/** Overrides remaining normalization depth from this object downward (e.g. Redux / Pinia state). */
|
|
4
|
+
export declare function setNormalizationDepthOverrideHint(obj: object, depth: number): void;
|
|
5
|
+
/** @internal */
|
|
6
|
+
export declare function hasSkipNormalizationHint(value: object): boolean;
|
|
7
|
+
/** @internal */
|
|
8
|
+
export declare function getNormalizationDepthOverrideHint(value: object): number | undefined;
|
|
9
|
+
//# sourceMappingURL=normalizationHints.d.ts.map
|
|
@@ -22,7 +22,7 @@ export declare function fill(source: {
|
|
|
22
22
|
* @param name The name of the property to be set
|
|
23
23
|
* @param value The value to which to set the property
|
|
24
24
|
*/
|
|
25
|
-
export declare function addNonEnumerableProperty(obj: object, name: string, value: unknown): void;
|
|
25
|
+
export declare function addNonEnumerableProperty(obj: object, name: string | symbol, value: unknown): void;
|
|
26
26
|
/**
|
|
27
27
|
* Remembers the original function on the wrapped function and
|
|
28
28
|
* patches up the prototype.
|
|
@@ -3,7 +3,9 @@ import { SpanJSON } from '../types-hoist/span';
|
|
|
3
3
|
/**
|
|
4
4
|
* Check if a span should be ignored based on the ignoreSpans configuration.
|
|
5
5
|
*/
|
|
6
|
-
export declare function shouldIgnoreSpan(span: Pick<SpanJSON, 'description' | 'op'
|
|
6
|
+
export declare function shouldIgnoreSpan(span: Pick<SpanJSON, 'description' | 'op'> & {
|
|
7
|
+
attributes?: Record<string, unknown>;
|
|
8
|
+
}, ignoreSpans: Required<ClientOptions>['ignoreSpans']): boolean;
|
|
7
9
|
/**
|
|
8
10
|
* Takes a list of spans, and a span that was dropped, and re-parents the child spans of the dropped span to the parent of the dropped span, if possible.
|
|
9
11
|
* This mutates the spans array in place!
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/core",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.51.0",
|
|
4
4
|
"description": "Base implementation for all Sentry JavaScript SDKs",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/core",
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
|
|
3
|
-
const hasSpanStreamingEnabled = require('./hasSpanStreamingEnabled.js');
|
|
4
|
-
const spanJsonToStreamedSpan = require('./spanJsonToStreamedSpan.js');
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Extracts gen_ai spans from a transaction event, converts them to span v2 format,
|
|
8
|
-
* and returns them as a SpanContainerItem.
|
|
9
|
-
*
|
|
10
|
-
* Only applies to static mode (non-streaming) transactions.
|
|
11
|
-
*
|
|
12
|
-
* WARNING: This function mutates `event.spans` by removing the extracted gen_ai spans
|
|
13
|
-
* from the array. Call this before creating the event envelope so the transaction
|
|
14
|
-
* item does not include the extracted spans.
|
|
15
|
-
*/
|
|
16
|
-
function extractGenAiSpansFromEvent(event, client) {
|
|
17
|
-
if (
|
|
18
|
-
event.type !== 'transaction' ||
|
|
19
|
-
!event.spans?.length ||
|
|
20
|
-
!event.sdkProcessingMetadata?.hasGenAiSpans ||
|
|
21
|
-
hasSpanStreamingEnabled.hasSpanStreamingEnabled(client)
|
|
22
|
-
) {
|
|
23
|
-
return undefined;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
const genAiSpans = [];
|
|
27
|
-
const remainingSpans = [];
|
|
28
|
-
|
|
29
|
-
for (const span of event.spans) {
|
|
30
|
-
if (span.op?.startsWith('gen_ai.')) {
|
|
31
|
-
genAiSpans.push(spanJsonToStreamedSpan.spanJsonToSerializedStreamedSpan(span));
|
|
32
|
-
} else {
|
|
33
|
-
remainingSpans.push(span);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
if (genAiSpans.length === 0) {
|
|
38
|
-
return undefined;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
event.spans = remainingSpans;
|
|
42
|
-
|
|
43
|
-
return [
|
|
44
|
-
{ type: 'span', item_count: genAiSpans.length, content_type: 'application/vnd.sentry.items.span.v2+json' },
|
|
45
|
-
{ items: genAiSpans },
|
|
46
|
-
];
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
exports.extractGenAiSpansFromEvent = extractGenAiSpansFromEvent;
|
|
50
|
-
//# sourceMappingURL=extractGenAiSpans.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"extractGenAiSpans.js","sources":["../../../../src/tracing/spans/extractGenAiSpans.ts"],"sourcesContent":["import type { Client } from '../../client';\nimport type { SpanContainerItem } from '../../types-hoist/envelope';\nimport type { Event } from '../../types-hoist/event';\nimport { hasSpanStreamingEnabled } from './hasSpanStreamingEnabled';\nimport { spanJsonToSerializedStreamedSpan } from './spanJsonToStreamedSpan';\n\n/**\n * Extracts gen_ai spans from a transaction event, converts them to span v2 format,\n * and returns them as a SpanContainerItem.\n *\n * Only applies to static mode (non-streaming) transactions.\n *\n * WARNING: This function mutates `event.spans` by removing the extracted gen_ai spans\n * from the array. Call this before creating the event envelope so the transaction\n * item does not include the extracted spans.\n */\nexport function extractGenAiSpansFromEvent(event: Event, client: Client): SpanContainerItem | undefined {\n if (\n event.type !== 'transaction' ||\n !event.spans?.length ||\n !event.sdkProcessingMetadata?.hasGenAiSpans ||\n hasSpanStreamingEnabled(client)\n ) {\n return undefined;\n }\n\n const genAiSpans = [];\n const remainingSpans = [];\n\n for (const span of event.spans) {\n if (span.op?.startsWith('gen_ai.')) {\n genAiSpans.push(spanJsonToSerializedStreamedSpan(span));\n } else {\n remainingSpans.push(span);\n }\n }\n\n if (genAiSpans.length === 0) {\n return undefined;\n }\n\n event.spans = remainingSpans;\n\n return [\n { type: 'span', item_count: genAiSpans.length, content_type: 'application/vnd.sentry.items.span.v2+json' },\n { items: genAiSpans },\n ];\n}\n"],"names":["hasSpanStreamingEnabled","spanJsonToSerializedStreamedSpan"],"mappings":";;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,0BAA0B,CAAC,KAAK,EAAS,MAAM,EAAyC;AACxG,EAAE;AACF,IAAI,KAAK,CAAC,IAAA,KAAS,aAAA;AACnB,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,MAAA;AAClB,IAAI,CAAC,KAAK,CAAC,qBAAqB,EAAE,aAAA;AAClC,IAAIA,+CAAuB,CAAC,MAAM;AAClC,IAAI;AACJ,IAAI,OAAO,SAAS;AACpB,EAAE;;AAEF,EAAE,MAAM,UAAA,GAAa,EAAE;AACvB,EAAE,MAAM,cAAA,GAAiB,EAAE;;AAE3B,EAAE,KAAK,MAAM,IAAA,IAAQ,KAAK,CAAC,KAAK,EAAE;AAClC,IAAI,IAAI,IAAI,CAAC,EAAE,EAAE,UAAU,CAAC,SAAS,CAAC,EAAE;AACxC,MAAM,UAAU,CAAC,IAAI,CAACC,uDAAgC,CAAC,IAAI,CAAC,CAAC;AAC7D,IAAI,OAAO;AACX,MAAM,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC;AAC/B,IAAI;AACJ,EAAE;;AAEF,EAAE,IAAI,UAAU,CAAC,MAAA,KAAW,CAAC,EAAE;AAC/B,IAAI,OAAO,SAAS;AACpB,EAAE;;AAEF,EAAE,KAAK,CAAC,KAAA,GAAQ,cAAc;;AAE9B,EAAE,OAAO;AACT,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,CAAC,MAAM,EAAE,YAAY,EAAE,6CAA6C;AAC9G,IAAI,EAAE,KAAK,EAAE,UAAA,EAAY;AACzB,GAAG;AACH;;;;"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
|
|
3
|
-
const spanUtils = require('../../utils/spanUtils.js');
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Converts a v1 SpanJSON (from a legacy transaction) to a serialized v2 StreamedSpan.
|
|
7
|
-
*/
|
|
8
|
-
function spanJsonToSerializedStreamedSpan(span) {
|
|
9
|
-
const streamedSpan = {
|
|
10
|
-
trace_id: span.trace_id,
|
|
11
|
-
span_id: span.span_id,
|
|
12
|
-
parent_span_id: span.parent_span_id,
|
|
13
|
-
name: span.description || '',
|
|
14
|
-
start_timestamp: span.start_timestamp,
|
|
15
|
-
end_timestamp: span.timestamp || span.start_timestamp,
|
|
16
|
-
status: !span.status || span.status === 'ok' || span.status === 'cancelled' ? 'ok' : 'error',
|
|
17
|
-
is_segment: false,
|
|
18
|
-
attributes: { ...(span.data ) },
|
|
19
|
-
links: span.links,
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
return spanUtils.streamedSpanJsonToSerializedSpan(streamedSpan);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
exports.spanJsonToSerializedStreamedSpan = spanJsonToSerializedStreamedSpan;
|
|
26
|
-
//# sourceMappingURL=spanJsonToStreamedSpan.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"spanJsonToStreamedSpan.js","sources":["../../../../src/tracing/spans/spanJsonToStreamedSpan.ts"],"sourcesContent":["import type { RawAttributes } from '../../attributes';\nimport type { SerializedStreamedSpan, SpanJSON, StreamedSpanJSON } from '../../types-hoist/span';\nimport { streamedSpanJsonToSerializedSpan } from '../../utils/spanUtils';\n\n/**\n * Converts a v1 SpanJSON (from a legacy transaction) to a serialized v2 StreamedSpan.\n */\nexport function spanJsonToSerializedStreamedSpan(span: SpanJSON): SerializedStreamedSpan {\n const streamedSpan: StreamedSpanJSON = {\n trace_id: span.trace_id,\n span_id: span.span_id,\n parent_span_id: span.parent_span_id,\n name: span.description || '',\n start_timestamp: span.start_timestamp,\n end_timestamp: span.timestamp || span.start_timestamp,\n status: !span.status || span.status === 'ok' || span.status === 'cancelled' ? 'ok' : 'error',\n is_segment: false,\n attributes: { ...(span.data as RawAttributes<Record<string, unknown>>) },\n links: span.links,\n };\n\n return streamedSpanJsonToSerializedSpan(streamedSpan);\n}\n"],"names":["streamedSpanJsonToSerializedSpan"],"mappings":";;;;AAIA;AACA;AACA;AACO,SAAS,gCAAgC,CAAC,IAAI,EAAoC;AACzF,EAAE,MAAM,YAAY,GAAqB;AACzC,IAAI,QAAQ,EAAE,IAAI,CAAC,QAAQ;AAC3B,IAAI,OAAO,EAAE,IAAI,CAAC,OAAO;AACzB,IAAI,cAAc,EAAE,IAAI,CAAC,cAAc;AACvC,IAAI,IAAI,EAAE,IAAI,CAAC,WAAA,IAAe,EAAE;AAChC,IAAI,eAAe,EAAE,IAAI,CAAC,eAAe;AACzC,IAAI,aAAa,EAAE,IAAI,CAAC,aAAa,IAAI,CAAC,eAAe;AACzD,IAAI,MAAM,EAAE,CAAC,IAAI,CAAC,MAAA,IAAU,IAAI,CAAC,MAAA,KAAW,IAAA,IAAQ,IAAI,CAAC,MAAA,KAAW,WAAA,GAAc,IAAA,GAAO,OAAO;AAChG,IAAI,UAAU,EAAE,KAAK;AACrB,IAAI,UAAU,EAAE,EAAE,IAAI,IAAI,CAAC,IAAA,EAAK,EAA4C;AAC5E,IAAI,KAAK,EAAE,IAAI,CAAC,KAAK;AACrB,GAAG;;AAEH,EAAE,OAAOA,0CAAgC,CAAC,YAAY,CAAC;AACvD;;;;"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { hasSpanStreamingEnabled } from './hasSpanStreamingEnabled.js';
|
|
2
|
-
import { spanJsonToSerializedStreamedSpan } from './spanJsonToStreamedSpan.js';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Extracts gen_ai spans from a transaction event, converts them to span v2 format,
|
|
6
|
-
* and returns them as a SpanContainerItem.
|
|
7
|
-
*
|
|
8
|
-
* Only applies to static mode (non-streaming) transactions.
|
|
9
|
-
*
|
|
10
|
-
* WARNING: This function mutates `event.spans` by removing the extracted gen_ai spans
|
|
11
|
-
* from the array. Call this before creating the event envelope so the transaction
|
|
12
|
-
* item does not include the extracted spans.
|
|
13
|
-
*/
|
|
14
|
-
function extractGenAiSpansFromEvent(event, client) {
|
|
15
|
-
if (
|
|
16
|
-
event.type !== 'transaction' ||
|
|
17
|
-
!event.spans?.length ||
|
|
18
|
-
!event.sdkProcessingMetadata?.hasGenAiSpans ||
|
|
19
|
-
hasSpanStreamingEnabled(client)
|
|
20
|
-
) {
|
|
21
|
-
return undefined;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const genAiSpans = [];
|
|
25
|
-
const remainingSpans = [];
|
|
26
|
-
|
|
27
|
-
for (const span of event.spans) {
|
|
28
|
-
if (span.op?.startsWith('gen_ai.')) {
|
|
29
|
-
genAiSpans.push(spanJsonToSerializedStreamedSpan(span));
|
|
30
|
-
} else {
|
|
31
|
-
remainingSpans.push(span);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
if (genAiSpans.length === 0) {
|
|
36
|
-
return undefined;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
event.spans = remainingSpans;
|
|
40
|
-
|
|
41
|
-
return [
|
|
42
|
-
{ type: 'span', item_count: genAiSpans.length, content_type: 'application/vnd.sentry.items.span.v2+json' },
|
|
43
|
-
{ items: genAiSpans },
|
|
44
|
-
];
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export { extractGenAiSpansFromEvent };
|
|
48
|
-
//# sourceMappingURL=extractGenAiSpans.js.map
|