@sentry/core 10.44.0 → 10.45.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.
Files changed (50) hide show
  1. package/build/cjs/integrations/eventFilters.js +4 -4
  2. package/build/cjs/integrations/eventFilters.js.map +1 -1
  3. package/build/cjs/tracing/anthropic-ai/streaming.js +3 -2
  4. package/build/cjs/tracing/anthropic-ai/streaming.js.map +1 -1
  5. package/build/cjs/tracing/anthropic-ai/utils.js +24 -1
  6. package/build/cjs/tracing/anthropic-ai/utils.js.map +1 -1
  7. package/build/cjs/tracing/google-genai/streaming.js +1 -1
  8. package/build/cjs/tracing/google-genai/streaming.js.map +1 -1
  9. package/build/cjs/tracing/langchain/index.js +3 -3
  10. package/build/cjs/tracing/langchain/index.js.map +1 -1
  11. package/build/cjs/utils/baggage.js +1 -1
  12. package/build/cjs/utils/baggage.js.map +1 -1
  13. package/build/cjs/utils/browser.js +1 -2
  14. package/build/cjs/utils/browser.js.map +1 -1
  15. package/build/cjs/utils/envelope.js +8 -9
  16. package/build/cjs/utils/envelope.js.map +1 -1
  17. package/build/cjs/utils/object.js +3 -10
  18. package/build/cjs/utils/object.js.map +1 -1
  19. package/build/cjs/utils/version.js +1 -1
  20. package/build/esm/integrations/eventFilters.js +4 -4
  21. package/build/esm/integrations/eventFilters.js.map +1 -1
  22. package/build/esm/package.json +1 -1
  23. package/build/esm/tracing/anthropic-ai/streaming.js +3 -2
  24. package/build/esm/tracing/anthropic-ai/streaming.js.map +1 -1
  25. package/build/esm/tracing/anthropic-ai/utils.js +24 -2
  26. package/build/esm/tracing/anthropic-ai/utils.js.map +1 -1
  27. package/build/esm/tracing/google-genai/streaming.js +1 -1
  28. package/build/esm/tracing/google-genai/streaming.js.map +1 -1
  29. package/build/esm/tracing/langchain/index.js +3 -3
  30. package/build/esm/tracing/langchain/index.js.map +1 -1
  31. package/build/esm/utils/baggage.js +1 -1
  32. package/build/esm/utils/baggage.js.map +1 -1
  33. package/build/esm/utils/browser.js +1 -2
  34. package/build/esm/utils/browser.js.map +1 -1
  35. package/build/esm/utils/envelope.js +8 -9
  36. package/build/esm/utils/envelope.js.map +1 -1
  37. package/build/esm/utils/object.js +3 -10
  38. package/build/esm/utils/object.js.map +1 -1
  39. package/build/esm/utils/version.js +1 -1
  40. package/build/types/tracing/anthropic-ai/streaming.d.ts.map +1 -1
  41. package/build/types/tracing/anthropic-ai/utils.d.ts +6 -0
  42. package/build/types/tracing/anthropic-ai/utils.d.ts.map +1 -1
  43. package/build/types/types-hoist/spanStatus.d.ts +1 -1
  44. package/build/types/types-hoist/spanStatus.d.ts.map +1 -1
  45. package/build/types/utils/browser.d.ts.map +1 -1
  46. package/build/types/utils/envelope.d.ts.map +1 -1
  47. package/build/types/utils/object.d.ts.map +1 -1
  48. package/build/types-ts3.8/tracing/anthropic-ai/utils.d.ts +6 -0
  49. package/build/types-ts3.8/types-hoist/spanStatus.d.ts +1 -1
  50. package/package.json +1 -1
@@ -1,4 +1,5 @@
1
1
  import { Span } from '../../types-hoist/span';
2
+ import { SpanStatusType } from '../../types-hoist/spanStatus';
2
3
  import { AnthropicAiInstrumentedMethod, AnthropicAiResponse } from './types';
3
4
  /**
4
5
  * Check if a method path should be instrumented
@@ -9,6 +10,11 @@ export declare function shouldInstrument(methodPath: string): methodPath is Anth
9
10
  * Extracts system instructions before truncation.
10
11
  */
11
12
  export declare function setMessagesAttribute(span: Span, messages: unknown): void;
13
+ /**
14
+ * Map an Anthropic API error type to a SpanStatusType value.
15
+ * @see https://docs.anthropic.com/en/api/errors#error-shapes
16
+ */
17
+ export declare function mapAnthropicErrorToStatusMessage(errorType: string | undefined): SpanStatusType;
12
18
  /**
13
19
  * Capture error information from the response
14
20
  * @see https://docs.anthropic.com/en/api/errors#error-shapes
@@ -1,4 +1,4 @@
1
- type SpanStatusType =
1
+ export type SpanStatusType =
2
2
  /** The operation completed successfully. */
3
3
  'ok'
4
4
  /** Deadline expired before operation could complete. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/core",
3
- "version": "10.44.0",
3
+ "version": "10.45.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",