@sentry/core 10.39.0-alpha.0 → 10.39.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 (155) hide show
  1. package/build/cjs/attributes.js.map +1 -1
  2. package/build/cjs/client.js +6 -13
  3. package/build/cjs/client.js.map +1 -1
  4. package/build/cjs/envelope.js +7 -41
  5. package/build/cjs/envelope.js.map +1 -1
  6. package/build/cjs/index.js +0 -48
  7. package/build/cjs/index.js.map +1 -1
  8. package/build/cjs/integration.js +0 -12
  9. package/build/cjs/integration.js.map +1 -1
  10. package/build/cjs/integrations/eventFilters.js +1 -1
  11. package/build/cjs/integrations/eventFilters.js.map +1 -1
  12. package/build/cjs/integrations/requestdata.js +6 -72
  13. package/build/cjs/integrations/requestdata.js.map +1 -1
  14. package/build/cjs/semanticAttributes.js +0 -84
  15. package/build/cjs/semanticAttributes.js.map +1 -1
  16. package/build/cjs/tracing/sentrySpan.js +0 -32
  17. package/build/cjs/tracing/sentrySpan.js.map +1 -1
  18. package/build/cjs/tracing/trace.js +0 -1
  19. package/build/cjs/tracing/trace.js.map +1 -1
  20. package/build/cjs/tracing/vercel-ai/index.js +0 -1
  21. package/build/cjs/tracing/vercel-ai/index.js.map +1 -1
  22. package/build/cjs/utils/featureFlags.js +0 -1
  23. package/build/cjs/utils/featureFlags.js.map +1 -1
  24. package/build/cjs/utils/scopeData.js +0 -4
  25. package/build/cjs/utils/scopeData.js.map +1 -1
  26. package/build/cjs/utils/should-ignore-span.js +9 -31
  27. package/build/cjs/utils/should-ignore-span.js.map +1 -1
  28. package/build/cjs/utils/spanUtils.js +2 -90
  29. package/build/cjs/utils/spanUtils.js.map +1 -1
  30. package/build/cjs/utils/version.js +1 -1
  31. package/build/cjs/utils/version.js.map +1 -1
  32. package/build/esm/attributes.js.map +1 -1
  33. package/build/esm/client.js +2 -9
  34. package/build/esm/client.js.map +1 -1
  35. package/build/esm/envelope.js +8 -41
  36. package/build/esm/envelope.js.map +1 -1
  37. package/build/esm/index.js +3 -10
  38. package/build/esm/index.js.map +1 -1
  39. package/build/esm/integration.js +1 -12
  40. package/build/esm/integration.js.map +1 -1
  41. package/build/esm/integrations/eventFilters.js +1 -1
  42. package/build/esm/integrations/eventFilters.js.map +1 -1
  43. package/build/esm/integrations/requestdata.js +6 -72
  44. package/build/esm/integrations/requestdata.js.map +1 -1
  45. package/build/esm/package.json +1 -1
  46. package/build/esm/semanticAttributes.js +1 -57
  47. package/build/esm/semanticAttributes.js.map +1 -1
  48. package/build/esm/tracing/sentrySpan.js +1 -33
  49. package/build/esm/tracing/sentrySpan.js.map +1 -1
  50. package/build/esm/tracing/trace.js +0 -1
  51. package/build/esm/tracing/trace.js.map +1 -1
  52. package/build/esm/tracing/vercel-ai/index.js +0 -1
  53. package/build/esm/tracing/vercel-ai/index.js.map +1 -1
  54. package/build/esm/utils/featureFlags.js +0 -1
  55. package/build/esm/utils/featureFlags.js.map +1 -1
  56. package/build/esm/utils/scopeData.js +0 -4
  57. package/build/esm/utils/scopeData.js.map +1 -1
  58. package/build/esm/utils/should-ignore-span.js +9 -31
  59. package/build/esm/utils/should-ignore-span.js.map +1 -1
  60. package/build/esm/utils/spanUtils.js +3 -87
  61. package/build/esm/utils/spanUtils.js.map +1 -1
  62. package/build/esm/utils/version.js +1 -1
  63. package/build/esm/utils/version.js.map +1 -1
  64. package/build/types/attributes.d.ts +1 -1
  65. package/build/types/attributes.d.ts.map +1 -1
  66. package/build/types/client.d.ts +2 -40
  67. package/build/types/client.d.ts.map +1 -1
  68. package/build/types/envelope.d.ts +1 -6
  69. package/build/types/envelope.d.ts.map +1 -1
  70. package/build/types/index.d.ts +4 -11
  71. package/build/types/index.d.ts.map +1 -1
  72. package/build/types/integration.d.ts +0 -4
  73. package/build/types/integration.d.ts.map +1 -1
  74. package/build/types/integrations/requestdata.d.ts.map +1 -1
  75. package/build/types/semanticAttributes.d.ts +0 -38
  76. package/build/types/semanticAttributes.d.ts.map +1 -1
  77. package/build/types/tracing/sentrySpan.d.ts +1 -10
  78. package/build/types/tracing/sentrySpan.d.ts.map +1 -1
  79. package/build/types/tracing/vercel-ai/index.d.ts.map +1 -1
  80. package/build/types/types-hoist/envelope.d.ts +2 -22
  81. package/build/types/types-hoist/envelope.d.ts.map +1 -1
  82. package/build/types/types-hoist/integration.d.ts +0 -7
  83. package/build/types/types-hoist/integration.d.ts.map +1 -1
  84. package/build/types/types-hoist/link.d.ts +2 -2
  85. package/build/types/types-hoist/link.d.ts.map +1 -1
  86. package/build/types/types-hoist/options.d.ts +2 -18
  87. package/build/types/types-hoist/options.d.ts.map +1 -1
  88. package/build/types/types-hoist/span.d.ts +0 -27
  89. package/build/types/types-hoist/span.d.ts.map +1 -1
  90. package/build/types/utils/featureFlags.d.ts.map +1 -1
  91. package/build/types/utils/scopeData.d.ts.map +1 -1
  92. package/build/types/utils/should-ignore-span.d.ts +3 -3
  93. package/build/types/utils/should-ignore-span.d.ts.map +1 -1
  94. package/build/types/utils/spanUtils.d.ts +2 -22
  95. package/build/types/utils/spanUtils.d.ts.map +1 -1
  96. package/build/types-ts3.8/attributes.d.ts +1 -1
  97. package/build/types-ts3.8/client.d.ts +2 -40
  98. package/build/types-ts3.8/envelope.d.ts +1 -6
  99. package/build/types-ts3.8/index.d.ts +4 -11
  100. package/build/types-ts3.8/integration.d.ts +0 -4
  101. package/build/types-ts3.8/semanticAttributes.d.ts +0 -38
  102. package/build/types-ts3.8/tracing/sentrySpan.d.ts +1 -10
  103. package/build/types-ts3.8/types-hoist/envelope.d.ts +2 -22
  104. package/build/types-ts3.8/types-hoist/integration.d.ts +0 -7
  105. package/build/types-ts3.8/types-hoist/link.d.ts +2 -2
  106. package/build/types-ts3.8/types-hoist/options.d.ts +2 -18
  107. package/build/types-ts3.8/types-hoist/span.d.ts +0 -27
  108. package/build/types-ts3.8/utils/should-ignore-span.d.ts +3 -3
  109. package/build/types-ts3.8/utils/spanUtils.d.ts +2 -22
  110. package/package.json +1 -1
  111. package/build/cjs/integrations/spanStreaming.js +0 -54
  112. package/build/cjs/integrations/spanStreaming.js.map +0 -1
  113. package/build/cjs/spans/captureSpan.js +0 -104
  114. package/build/cjs/spans/captureSpan.js.map +0 -1
  115. package/build/cjs/spans/spanBuffer.js +0 -121
  116. package/build/cjs/spans/spanBuffer.js.map +0 -1
  117. package/build/cjs/spans/spanFirstUtils.js +0 -186
  118. package/build/cjs/spans/spanFirstUtils.js.map +0 -1
  119. package/build/cjs/utils/beforeSendSpan.js +0 -36
  120. package/build/cjs/utils/beforeSendSpan.js.map +0 -1
  121. package/build/cjs/utils/hasSpanStreamingEnabled.js +0 -21
  122. package/build/cjs/utils/hasSpanStreamingEnabled.js.map +0 -1
  123. package/build/esm/integrations/spanStreaming.js +0 -52
  124. package/build/esm/integrations/spanStreaming.js.map +0 -1
  125. package/build/esm/spans/captureSpan.js +0 -102
  126. package/build/esm/spans/captureSpan.js.map +0 -1
  127. package/build/esm/spans/spanBuffer.js +0 -119
  128. package/build/esm/spans/spanBuffer.js.map +0 -1
  129. package/build/esm/spans/spanFirstUtils.js +0 -182
  130. package/build/esm/spans/spanFirstUtils.js.map +0 -1
  131. package/build/esm/utils/beforeSendSpan.js +0 -33
  132. package/build/esm/utils/beforeSendSpan.js.map +0 -1
  133. package/build/esm/utils/hasSpanStreamingEnabled.js +0 -19
  134. package/build/esm/utils/hasSpanStreamingEnabled.js.map +0 -1
  135. package/build/types/integrations/spanStreaming.d.ts +0 -11
  136. package/build/types/integrations/spanStreaming.d.ts.map +0 -1
  137. package/build/types/spans/captureSpan.d.ts +0 -10
  138. package/build/types/spans/captureSpan.d.ts.map +0 -1
  139. package/build/types/spans/spanBuffer.d.ts +0 -35
  140. package/build/types/spans/spanBuffer.d.ts.map +0 -1
  141. package/build/types/spans/spanFirstUtils.d.ts +0 -20
  142. package/build/types/spans/spanFirstUtils.d.ts.map +0 -1
  143. package/build/types/types-hoist/attributes.d.ts +0 -19
  144. package/build/types/types-hoist/attributes.d.ts.map +0 -1
  145. package/build/types/utils/beforeSendSpan.d.ts +0 -22
  146. package/build/types/utils/beforeSendSpan.d.ts.map +0 -1
  147. package/build/types/utils/hasSpanStreamingEnabled.d.ts +0 -9
  148. package/build/types/utils/hasSpanStreamingEnabled.d.ts.map +0 -1
  149. package/build/types-ts3.8/integrations/spanStreaming.d.ts +0 -11
  150. package/build/types-ts3.8/spans/captureSpan.d.ts +0 -10
  151. package/build/types-ts3.8/spans/spanBuffer.d.ts +0 -35
  152. package/build/types-ts3.8/spans/spanFirstUtils.d.ts +0 -20
  153. package/build/types-ts3.8/types-hoist/attributes.d.ts +0 -19
  154. package/build/types-ts3.8/utils/beforeSendSpan.d.ts +0 -22
  155. package/build/types-ts3.8/utils/hasSpanStreamingEnabled.d.ts +0 -9
@@ -1,22 +0,0 @@
1
- import type { ClientOptions, SpanV2CompatibleBeforeSendSpanCallback } from '../types-hoist/options';
2
- import type { SpanV2JSON } from '../types-hoist/span';
3
- /**
4
- * A wrapper to use the new span format in your `beforeSendSpan` callback.
5
- *
6
- * @example
7
- *
8
- * Sentry.init({
9
- * beforeSendSpan: withStreamSpan((span) => {
10
- * return span;
11
- * }),
12
- * });
13
- *
14
- * @param callback
15
- * @returns
16
- */
17
- export declare function withStreamSpan(callback: (span: SpanV2JSON) => SpanV2JSON): SpanV2CompatibleBeforeSendSpanCallback;
18
- /**
19
- * Typesafe check to identify the expected span json format of the `beforeSendSpan` callback.
20
- */
21
- export declare function isV2BeforeSendSpanCallback(callback: ClientOptions['beforeSendSpan']): callback is SpanV2CompatibleBeforeSendSpanCallback;
22
- //# sourceMappingURL=beforeSendSpan.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"beforeSendSpan.d.ts","sourceRoot":"","sources":["../../../src/utils/beforeSendSpan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,sCAAsC,EAAE,MAAM,wBAAwB,CAAC;AACpG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGtD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,UAAU,GAAG,sCAAsC,CAIjH;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,aAAa,CAAC,gBAAgB,CAAC,GACxC,QAAQ,IAAI,sCAAsC,CAEpD"}
@@ -1,9 +0,0 @@
1
- import type { Client } from '../client';
2
- /**
3
- * Determines if the SDK is configured for span streaming.
4
- * Span streaming is enabled when `traceLifecycle` is set to `stream`.
5
- * (In Browser, users must add `spanStreamingIntegration` as well but it
6
- * already checks itself and configures `traceLifecycle` appropriately)
7
- */
8
- export declare function hasSpanStreamingEnabled(maybeClient?: Client | undefined): boolean;
9
- //# sourceMappingURL=hasSpanStreamingEnabled.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hasSpanStreamingEnabled.d.ts","sourceRoot":"","sources":["../../../src/utils/hasSpanStreamingEnabled.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAMxC;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,WAAW,GAAE,MAAM,GAAG,SAAuB,GAAG,OAAO,CAK9F"}
@@ -1,11 +0,0 @@
1
- export interface ServerSpanStreamingOptions {
2
- /** Max spans per envelope batch (default: 1000) */
3
- maxSpanLimit?: number;
4
- /** Flush interval in ms (default: 5000) */
5
- flushInterval?: number;
6
- }
7
- /**
8
- * Span streaming integration used by server runtime SDKs.
9
- */
10
- export declare const spanStreamingIntegration: (options?: ServerSpanStreamingOptions | undefined) => import("../types-hoist/integration").Integration;
11
- //# sourceMappingURL=spanStreaming.d.ts.map
@@ -1,10 +0,0 @@
1
- import { Client } from '../client';
2
- import { Span } from '../types-hoist/span';
3
- /**
4
- * Captures a span and returns a JSON representation to be enqueued for sending.
5
- *
6
- * IMPORTANT: This function converts the span to JSON immediately to avoid writing
7
- * to an already-ended OTel span instance (which is blocked by the OTel Span class).
8
- */
9
- export declare function captureSpan(span: Span, client?: Client<import("..").ClientOptions<import("..").BaseTransportOptions>> | undefined): void;
10
- //# sourceMappingURL=captureSpan.d.ts.map
@@ -1,35 +0,0 @@
1
- import { Client } from '../client';
2
- import { SpanV2JSONWithSegmentRef } from '../types-hoist/span';
3
- export interface SpanBufferOptions {
4
- /** Max spans per trace before auto-flush (default: 1000) */
5
- maxSpanLimit?: number;
6
- /** Flush interval in ms (default: 5000) */
7
- flushInterval?: number;
8
- }
9
- /**
10
- * A buffer for span JSON objects that flushes them to Sentry in Span v2 envelopes.
11
- * Handles interval-based flushing, size thresholds, and graceful shutdown.
12
- */
13
- export declare class SpanBuffer {
14
- private _spanTreeMap;
15
- private _flushIntervalId;
16
- private _client;
17
- private _maxSpanLimit;
18
- private _flushInterval;
19
- constructor(client: Client, options?: SpanBufferOptions);
20
- /**
21
- * Add a span to the buffer.
22
- */
23
- addSpan(spanJSON: SpanV2JSONWithSegmentRef): void;
24
- /**
25
- * Flush all buffered traces.
26
- */
27
- flush(): void;
28
- /**
29
- * Flush spans of a specific trace.
30
- * In contrast to {@link SpanBuffer.flush}, this method does not flush all traces, but only the one with the given traceId.
31
- */
32
- flushTrace(traceId: string): void;
33
- private _debounceFlushInterval;
34
- }
35
- //# sourceMappingURL=spanBuffer.d.ts.map
@@ -1,20 +0,0 @@
1
- import { RawAttributes } from '../attributes';
2
- import { Contexts } from '../types-hoist/context';
3
- import { SpanV2JSON } from '../types-hoist/span';
4
- /**
5
- * Only set a span JSON attribute if it is not already set.
6
- * This is used to safely set attributes on JSON objects without mutating already-ended span instances.
7
- */
8
- export declare function safeSetSpanJSONAttributes(spanJSON: SpanV2JSON, newAttributes: RawAttributes<Record<string, unknown>>): void;
9
- /**
10
- * Apply a user-provided beforeSendSpan callback to a span JSON.
11
- */
12
- export declare function applyBeforeSendSpanCallback(span: SpanV2JSON, beforeSendSpan: (span: SpanV2JSON) => SpanV2JSON): SpanV2JSON;
13
- /**
14
- * Converts a context object to a set of attributes.
15
- * Only includes attributes that are primitives (for now).
16
- * @param contexts - The context object to convert.
17
- * @returns The attributes object.
18
- */
19
- export declare function contextsToAttributes(contexts: Contexts): RawAttributes<Record<string, unknown>>;
20
- //# sourceMappingURL=spanFirstUtils.d.ts.map
@@ -1,19 +0,0 @@
1
- import { AttributeUnit } from '../attributes';
2
- export type SerializedAttributes = Record<string, SerializedAttribute>;
3
- export type SerializedAttribute = ({
4
- type: 'string';
5
- value: string;
6
- } | {
7
- type: 'integer';
8
- value: number;
9
- } | {
10
- type: 'double';
11
- value: number;
12
- } | {
13
- type: 'boolean';
14
- value: boolean;
15
- }) & {
16
- unit?: AttributeUnit;
17
- };
18
- export type SerializedAttributeType = 'string' | 'integer' | 'double' | 'boolean';
19
- //# sourceMappingURL=attributes.d.ts.map
@@ -1,22 +0,0 @@
1
- import { ClientOptions, SpanV2CompatibleBeforeSendSpanCallback } from '../types-hoist/options';
2
- import { SpanV2JSON } from '../types-hoist/span';
3
- /**
4
- * A wrapper to use the new span format in your `beforeSendSpan` callback.
5
- *
6
- * @example
7
- *
8
- * Sentry.init({
9
- * beforeSendSpan: withStreamSpan((span) => {
10
- * return span;
11
- * }),
12
- * });
13
- *
14
- * @param callback
15
- * @returns
16
- */
17
- export declare function withStreamSpan(callback: (span: SpanV2JSON) => SpanV2JSON): SpanV2CompatibleBeforeSendSpanCallback;
18
- /**
19
- * Typesafe check to identify the expected span json format of the `beforeSendSpan` callback.
20
- */
21
- export declare function isV2BeforeSendSpanCallback(callback: ClientOptions['beforeSendSpan']): callback is SpanV2CompatibleBeforeSendSpanCallback;
22
- //# sourceMappingURL=beforeSendSpan.d.ts.map
@@ -1,9 +0,0 @@
1
- import { Client } from '../client';
2
- /**
3
- * Determines if the SDK is configured for span streaming.
4
- * Span streaming is enabled when `traceLifecycle` is set to `stream`.
5
- * (In Browser, users must add `spanStreamingIntegration` as well but it
6
- * already checks itself and configures `traceLifecycle` appropriately)
7
- */
8
- export declare function hasSpanStreamingEnabled(maybeClient?: Client | undefined): boolean;
9
- //# sourceMappingURL=hasSpanStreamingEnabled.d.ts.map