@sentry/core 10.45.0 → 10.46.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/asyncContext/stackStrategy.js +6 -11
- package/build/cjs/asyncContext/stackStrategy.js.map +1 -1
- package/build/cjs/tracing/ai/messageTruncation.js +57 -39
- package/build/cjs/tracing/ai/messageTruncation.js.map +1 -1
- package/build/cjs/tracing/ai/utils.js +81 -0
- package/build/cjs/tracing/ai/utils.js.map +1 -1
- package/build/cjs/tracing/anthropic-ai/index.js +35 -19
- package/build/cjs/tracing/anthropic-ai/index.js.map +1 -1
- package/build/cjs/tracing/openai/index.js +3 -73
- package/build/cjs/tracing/openai/index.js.map +1 -1
- package/build/cjs/tracing/openai/utils.js +0 -8
- package/build/cjs/tracing/openai/utils.js.map +1 -1
- package/build/cjs/tracing/vercel-ai/index.js +9 -1
- package/build/cjs/tracing/vercel-ai/index.js.map +1 -1
- package/build/cjs/utils/chain-and-copy-promiselike.js +57 -0
- package/build/cjs/utils/chain-and-copy-promiselike.js.map +1 -0
- package/build/cjs/utils/handleCallbackErrors.js +15 -11
- package/build/cjs/utils/handleCallbackErrors.js.map +1 -1
- package/build/cjs/utils/version.js +1 -1
- package/build/esm/asyncContext/stackStrategy.js +6 -11
- package/build/esm/asyncContext/stackStrategy.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/esm/tracing/ai/messageTruncation.js +57 -39
- package/build/esm/tracing/ai/messageTruncation.js.map +1 -1
- package/build/esm/tracing/ai/utils.js +81 -1
- package/build/esm/tracing/ai/utils.js.map +1 -1
- package/build/esm/tracing/anthropic-ai/index.js +36 -20
- package/build/esm/tracing/anthropic-ai/index.js.map +1 -1
- package/build/esm/tracing/openai/index.js +4 -74
- package/build/esm/tracing/openai/index.js.map +1 -1
- package/build/esm/tracing/openai/utils.js +1 -8
- package/build/esm/tracing/openai/utils.js.map +1 -1
- package/build/esm/tracing/vercel-ai/index.js +9 -1
- package/build/esm/tracing/vercel-ai/index.js.map +1 -1
- package/build/esm/utils/chain-and-copy-promiselike.js +55 -0
- package/build/esm/utils/chain-and-copy-promiselike.js.map +1 -0
- package/build/esm/utils/handleCallbackErrors.js +15 -11
- package/build/esm/utils/handleCallbackErrors.js.map +1 -1
- package/build/esm/utils/version.js +1 -1
- package/build/types/asyncContext/stackStrategy.d.ts.map +1 -1
- package/build/types/tracing/ai/messageTruncation.d.ts.map +1 -1
- package/build/types/tracing/ai/utils.d.ts +9 -0
- package/build/types/tracing/ai/utils.d.ts.map +1 -1
- package/build/types/tracing/anthropic-ai/index.d.ts.map +1 -1
- package/build/types/tracing/openai/index.d.ts.map +1 -1
- package/build/types/tracing/openai/utils.d.ts +0 -4
- package/build/types/tracing/openai/utils.d.ts.map +1 -1
- package/build/types/tracing/vercel-ai/index.d.ts.map +1 -1
- package/build/types/utils/chain-and-copy-promiselike.d.ts +6 -0
- package/build/types/utils/chain-and-copy-promiselike.d.ts.map +1 -0
- package/build/types/utils/handleCallbackErrors.d.ts.map +1 -1
- package/build/types-ts3.8/tracing/ai/utils.d.ts +9 -0
- package/build/types-ts3.8/tracing/openai/utils.d.ts +0 -4
- package/build/types-ts3.8/utils/chain-and-copy-promiselike.d.ts +6 -0
- package/package.json +1 -1
|
@@ -14,10 +14,6 @@ export declare function getSpanOperation(methodPath: string): string;
|
|
|
14
14
|
* Check if a method path should be instrumented
|
|
15
15
|
*/
|
|
16
16
|
export declare function shouldInstrument(methodPath: string): methodPath is InstrumentedMethod;
|
|
17
|
-
/**
|
|
18
|
-
* Build method path from current traversal
|
|
19
|
-
*/
|
|
20
|
-
export declare function buildMethodPath(currentPath: string, prop: string): string;
|
|
21
17
|
/**
|
|
22
18
|
* Check if response is a Chat Completion object
|
|
23
19
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/tracing/openai/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IA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,MAAM,EAAE,OAAO,CAAC,CAoBjG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tracing/vercel-ai/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tracing/vercel-ai/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AA0b3C;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAI1D"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copy the properties from a decorated promiselike object onto its chained
|
|
3
|
+
* actual promise.
|
|
4
|
+
*/
|
|
5
|
+
export declare const chainAndCopyPromiseLike: <V, T extends PromiseLike<V>>(original: T, onSuccess: (value: V) => void, onError: (e: unknown) => void) => T;
|
|
6
|
+
//# sourceMappingURL=chain-and-copy-promiselike.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chain-and-copy-promiselike.d.ts","sourceRoot":"","sources":["../../../src/utils/chain-and-copy-promiselike.ts"],"names":[],"mappings":"AAQA;;;GAGG;AACH,eAAO,MAAM,uBAAuB,GAAI,CAAC,EAAE,CAAC,SAAS,WAAW,CAAC,CAAC,CAAC,EACjE,UAAU,CAAC,EACX,WAAW,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,EAC7B,SAAS,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,KAC5B,CAcF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handleCallbackErrors.d.ts","sourceRoot":"","sources":["../../../src/utils/handleCallbackErrors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"handleCallbackErrors.d.ts","sourceRoot":"","sources":["../../../src/utils/handleCallbackErrors.ts"],"names":[],"mappings":"AAKA,KAAK,cAAc,CAAC,CAAC,IAAI,CAAC,SAAS,IAAI,GAAG,SAAS,GAC/C,CAAC,GACD,CAAC,SAAS,MAAM,GAAG;IAAE,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,EAAE,GAAG,IAAI,EAAE,MAAM,CAAC,GAAG,GAAG,CAAA;CAAE,GACtE,CAAC,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,GAAG,IAAI,EAAE,MAAM,CAAC,KAAK,GAAG,GACjD,CAAC,GACD,KAAK,GACP,CAAC,CAAC;AAIR,wBAAgB,oBAAoB,CAAC,EAAE,SAAS,MAAM,OAAO,CAAC,GAAG,CAAC,EAAE,YAAY,GAAG,cAAc,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,EAC/G,EAAE,EAAE,EAAE,EACN,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,EACjC,SAAS,CAAC,EAAE,MAAM,IAAI,EACtB,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,GACzC,UAAU,CAAC,EAAE,CAAC,CAAC;AAElB,wBAAgB,oBAAoB,CAAC,EAAE,SAAS,MAAM,GAAG,EACvD,EAAE,EAAE,EAAE,EACN,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,EACjC,SAAS,CAAC,EAAE,MAAM,IAAI,EACtB,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC,EAAE,CAAC,KAAK,IAAI,GAC3C,UAAU,CAAC,EAAE,CAAC,CAAC"}
|
|
@@ -49,4 +49,13 @@ export declare function extractSystemInstructions(messages: unknown[] | unknown)
|
|
|
49
49
|
systemInstructions: string | undefined;
|
|
50
50
|
filteredMessages: unknown[] | unknown;
|
|
51
51
|
};
|
|
52
|
+
/**
|
|
53
|
+
* Wraps a promise-like object to preserve additional methods (like .withResponse())
|
|
54
|
+
* that AI SDK clients (OpenAI, Anthropic) attach to their APIPromise return values.
|
|
55
|
+
*
|
|
56
|
+
* Standard Promise methods (.then, .catch, .finally) are routed to the instrumented
|
|
57
|
+
* promise to preserve Sentry's span instrumentation, while custom SDK methods are
|
|
58
|
+
* forwarded to the original promise to maintain the SDK's API surface.
|
|
59
|
+
*/
|
|
60
|
+
export declare function wrapPromiseWithMethods<R>(originalPromiseLike: Promise<R>, instrumentedPromise: Promise<R>, mechanismType: string): Promise<R>;
|
|
52
61
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -14,10 +14,6 @@ export declare function getSpanOperation(methodPath: string): string;
|
|
|
14
14
|
* Check if a method path should be instrumented
|
|
15
15
|
*/
|
|
16
16
|
export declare function shouldInstrument(methodPath: string): methodPath is InstrumentedMethod;
|
|
17
|
-
/**
|
|
18
|
-
* Build method path from current traversal
|
|
19
|
-
*/
|
|
20
|
-
export declare function buildMethodPath(currentPath: string, prop: string): string;
|
|
21
17
|
/**
|
|
22
18
|
* Check if response is a Chat Completion object
|
|
23
19
|
*/
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copy the properties from a decorated promiselike object onto its chained
|
|
3
|
+
* actual promise.
|
|
4
|
+
*/
|
|
5
|
+
export declare const chainAndCopyPromiseLike: <V, T extends PromiseLike<V>>(original: T, onSuccess: (value: V) => void, onError: (e: unknown) => void) => T;
|
|
6
|
+
//# sourceMappingURL=chain-and-copy-promiselike.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/core",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.46.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",
|