@sentry/core 10.50.0-alpha.0 → 10.50.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 (55) hide show
  1. package/build/cjs/client.js +0 -9
  2. package/build/cjs/client.js.map +1 -1
  3. package/build/cjs/instrument/console.js +1 -2
  4. package/build/cjs/instrument/console.js.map +1 -1
  5. package/build/cjs/tracing/ai/utils.js +4 -4
  6. package/build/cjs/tracing/ai/utils.js.map +1 -1
  7. package/build/cjs/tracing/sentrySpan.js +0 -5
  8. package/build/cjs/tracing/sentrySpan.js.map +1 -1
  9. package/build/cjs/tracing/vercel-ai/index.js +0 -9
  10. package/build/cjs/tracing/vercel-ai/index.js.map +1 -1
  11. package/build/cjs/utils/version.js +1 -1
  12. package/build/cjs/utils/version.js.map +1 -1
  13. package/build/esm/client.js +0 -9
  14. package/build/esm/client.js.map +1 -1
  15. package/build/esm/instrument/console.js +1 -2
  16. package/build/esm/instrument/console.js.map +1 -1
  17. package/build/esm/package.json +1 -1
  18. package/build/esm/tracing/ai/utils.js +4 -4
  19. package/build/esm/tracing/ai/utils.js.map +1 -1
  20. package/build/esm/tracing/sentrySpan.js +0 -5
  21. package/build/esm/tracing/sentrySpan.js.map +1 -1
  22. package/build/esm/tracing/vercel-ai/index.js +0 -9
  23. package/build/esm/tracing/vercel-ai/index.js.map +1 -1
  24. package/build/esm/utils/version.js +1 -1
  25. package/build/esm/utils/version.js.map +1 -1
  26. package/build/types/client.d.ts.map +1 -1
  27. package/build/types/index.d.ts +2 -1
  28. package/build/types/index.d.ts.map +1 -1
  29. package/build/types/tracing/ai/utils.d.ts +1 -3
  30. package/build/types/tracing/ai/utils.d.ts.map +1 -1
  31. package/build/types/tracing/google-genai/types.d.ts +5 -2
  32. package/build/types/tracing/google-genai/types.d.ts.map +1 -1
  33. package/build/types/tracing/sentrySpan.d.ts.map +1 -1
  34. package/build/types/tracing/vercel-ai/index.d.ts.map +1 -1
  35. package/build/types/types-hoist/envelope.d.ts +1 -1
  36. package/build/types/types-hoist/envelope.d.ts.map +1 -1
  37. package/build/types-ts3.8/index.d.ts +2 -1
  38. package/build/types-ts3.8/tracing/ai/utils.d.ts +1 -3
  39. package/build/types-ts3.8/tracing/google-genai/types.d.ts +5 -2
  40. package/build/types-ts3.8/types-hoist/envelope.d.ts +1 -1
  41. package/package.json +1 -1
  42. package/build/cjs/tracing/spans/extractGenAiSpans.js +0 -50
  43. package/build/cjs/tracing/spans/extractGenAiSpans.js.map +0 -1
  44. package/build/cjs/tracing/spans/spanJsonToStreamedSpan.js +0 -26
  45. package/build/cjs/tracing/spans/spanJsonToStreamedSpan.js.map +0 -1
  46. package/build/esm/tracing/spans/extractGenAiSpans.js +0 -48
  47. package/build/esm/tracing/spans/extractGenAiSpans.js.map +0 -1
  48. package/build/esm/tracing/spans/spanJsonToStreamedSpan.js +0 -24
  49. package/build/esm/tracing/spans/spanJsonToStreamedSpan.js.map +0 -1
  50. package/build/types/tracing/spans/extractGenAiSpans.d.ts +0 -15
  51. package/build/types/tracing/spans/extractGenAiSpans.d.ts.map +0 -1
  52. package/build/types/tracing/spans/spanJsonToStreamedSpan.d.ts +0 -6
  53. package/build/types/tracing/spans/spanJsonToStreamedSpan.d.ts.map +0 -1
  54. package/build/types-ts3.8/tracing/spans/extractGenAiSpans.d.ts +0 -15
  55. package/build/types-ts3.8/tracing/spans/spanJsonToStreamedSpan.d.ts +0 -6
@@ -1 +1 @@
1
- {"version":3,"file":"envelope.d.ts","sourceRoot":"","sources":["../../../src/types-hoist/envelope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,KAAK,EAAE,aA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ACpB,cAAc,GACd,eAAe,GACf,YAAY,GACZ,oBAAoB,GACpB,mBAAmB,GACnB,WAAW,GACX,cAAc,CAAC;AACnB,MAAM,MAAM,YAAY,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -107,7 +107,8 @@ export { LANGGRAPH_INTEGRATION_NAME } from './tracing/langgraph/constants';
107
107
  export { LangGraphOptions, LangGraphIntegration, CompiledGraph } from './tracing/langgraph/types';
108
108
  export { OpenAiClient, OpenAiOptions, InstrumentedMethod } from './tracing/openai/types';
109
109
  export { AnthropicAiClient, AnthropicAiOptions, AnthropicAiInstrumentedMethod, AnthropicAiResponse, } from './tracing/anthropic-ai/types';
110
- export { GoogleGenAIClient, GoogleGenAIChat, GoogleGenAIOptions, GoogleGenAIIstrumentedMethod, } from './tracing/google-genai/types';
110
+ export { GoogleGenAIClient, GoogleGenAIChat, GoogleGenAIOptions, GoogleGenAIInstrumentedMethod, } from './tracing/google-genai/types';
111
+ export { GoogleGenAIIstrumentedMethod } from './tracing/google-genai/types';
111
112
  export { SpanBuffer } from './tracing/spans/spanBuffer';
112
113
  export { hasSpanStreamingEnabled } from './tracing/spans/hasSpanStreamingEnabled';
113
114
  export { spanStreamingIntegration } from './integrations/spanStreaming';
@@ -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 defaults to off: gen_ai spans always travel as v2
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 This type is no longer used and will be removed in the next major version.
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 = keyof typeof GOOGLE_GENAI_METHOD_REGISTRY;
179
+ export type GoogleGenAIIstrumentedMethod = GoogleGenAIInstrumentedMethod;
177
180
  export type GoogleGenAIResponse = GenerateContentResponse;
178
181
  export {};
179
182
  //# sourceMappingURL=types.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 | SpanContainerItem>;
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 = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/core",
3
- "version": "10.50.0-alpha.0",
3
+ "version": "10.50.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
@@ -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":[],"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,IAAI,uBAAuB,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,CAAC,gCAAgC,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,24 +0,0 @@
1
- import { streamedSpanJsonToSerializedSpan } from '../../utils/spanUtils.js';
2
-
3
- /**
4
- * Converts a v1 SpanJSON (from a legacy transaction) to a serialized v2 StreamedSpan.
5
- */
6
- function spanJsonToSerializedStreamedSpan(span) {
7
- const streamedSpan = {
8
- trace_id: span.trace_id,
9
- span_id: span.span_id,
10
- parent_span_id: span.parent_span_id,
11
- name: span.description || '',
12
- start_timestamp: span.start_timestamp,
13
- end_timestamp: span.timestamp || span.start_timestamp,
14
- status: !span.status || span.status === 'ok' || span.status === 'cancelled' ? 'ok' : 'error',
15
- is_segment: false,
16
- attributes: { ...(span.data ) },
17
- links: span.links,
18
- };
19
-
20
- return streamedSpanJsonToSerializedSpan(streamedSpan);
21
- }
22
-
23
- export { spanJsonToSerializedStreamedSpan };
24
- //# 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":[],"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,OAAO,gCAAgC,CAAC,YAAY,CAAC;AACvD;;;;"}
@@ -1,15 +0,0 @@
1
- import type { Client } from '../../client';
2
- import type { SpanContainerItem } from '../../types-hoist/envelope';
3
- import type { Event } from '../../types-hoist/event';
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
- export declare function extractGenAiSpansFromEvent(event: Event, client: Client): SpanContainerItem | undefined;
15
- //# sourceMappingURL=extractGenAiSpans.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"extractGenAiSpans.d.ts","sourceRoot":"","sources":["../../../../src/tracing/spans/extractGenAiSpans.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAIrD;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS,CA+BtG"}
@@ -1,6 +0,0 @@
1
- import type { SerializedStreamedSpan, SpanJSON } from '../../types-hoist/span';
2
- /**
3
- * Converts a v1 SpanJSON (from a legacy transaction) to a serialized v2 StreamedSpan.
4
- */
5
- export declare function spanJsonToSerializedStreamedSpan(span: SpanJSON): SerializedStreamedSpan;
6
- //# sourceMappingURL=spanJsonToStreamedSpan.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"spanJsonToStreamedSpan.d.ts","sourceRoot":"","sources":["../../../../src/tracing/spans/spanJsonToStreamedSpan.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,QAAQ,EAAoB,MAAM,wBAAwB,CAAC;AAGjG;;GAEG;AACH,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,QAAQ,GAAG,sBAAsB,CAevF"}
@@ -1,15 +0,0 @@
1
- import { Client } from '../../client';
2
- import { SpanContainerItem } from '../../types-hoist/envelope';
3
- import { Event } from '../../types-hoist/event';
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
- export declare function extractGenAiSpansFromEvent(event: Event, client: Client): SpanContainerItem | undefined;
15
- //# sourceMappingURL=extractGenAiSpans.d.ts.map
@@ -1,6 +0,0 @@
1
- import { SerializedStreamedSpan, SpanJSON } from '../../types-hoist/span';
2
- /**
3
- * Converts a v1 SpanJSON (from a legacy transaction) to a serialized v2 StreamedSpan.
4
- */
5
- export declare function spanJsonToSerializedStreamedSpan(span: SpanJSON): SerializedStreamedSpan;
6
- //# sourceMappingURL=spanJsonToStreamedSpan.d.ts.map