@sentry/core 10.37.0 → 10.39.0-alpha.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/attributes.js.map +1 -1
- package/build/cjs/client.js +22 -12
- package/build/cjs/client.js.map +1 -1
- package/build/cjs/envelope.js +41 -7
- package/build/cjs/envelope.js.map +1 -1
- package/build/cjs/index.js +131 -79
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/integration.js +12 -0
- package/build/cjs/integration.js.map +1 -1
- package/build/cjs/integrations/captureconsole.js +2 -2
- package/build/cjs/integrations/captureconsole.js.map +1 -1
- package/build/cjs/integrations/eventFilters.js +1 -1
- package/build/cjs/integrations/eventFilters.js.map +1 -1
- package/build/cjs/integrations/mcp-server/correlation.js +54 -10
- package/build/cjs/integrations/mcp-server/correlation.js.map +1 -1
- package/build/cjs/integrations/mcp-server/errorCapture.js +2 -2
- package/build/cjs/integrations/mcp-server/errorCapture.js.map +1 -1
- package/build/cjs/integrations/mcp-server/sessionManagement.js +50 -16
- package/build/cjs/integrations/mcp-server/sessionManagement.js.map +1 -1
- package/build/cjs/integrations/requestdata.js +72 -6
- package/build/cjs/integrations/requestdata.js.map +1 -1
- package/build/cjs/integrations/spanStreaming.js +54 -0
- package/build/cjs/integrations/spanStreaming.js.map +1 -0
- package/build/cjs/integrations/supabase.js +4 -4
- package/build/cjs/integrations/supabase.js.map +1 -1
- package/build/cjs/metrics/public-api.js +3 -3
- package/build/cjs/metrics/public-api.js.map +1 -1
- package/build/cjs/scope.js +1 -1
- package/build/cjs/scope.js.map +1 -1
- package/build/cjs/semanticAttributes.js +84 -0
- package/build/cjs/semanticAttributes.js.map +1 -1
- package/build/cjs/spans/captureSpan.js +104 -0
- package/build/cjs/spans/captureSpan.js.map +1 -0
- package/build/cjs/spans/spanBuffer.js +121 -0
- package/build/cjs/spans/spanBuffer.js.map +1 -0
- package/build/cjs/spans/spanFirstUtils.js +186 -0
- package/build/cjs/spans/spanFirstUtils.js.map +1 -0
- 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/anthropic-ai/index.js +3 -3
- package/build/cjs/tracing/anthropic-ai/index.js.map +1 -1
- package/build/cjs/tracing/anthropic-ai/streaming.js +3 -3
- package/build/cjs/tracing/anthropic-ai/streaming.js.map +1 -1
- package/build/cjs/tracing/anthropic-ai/utils.js +2 -2
- package/build/cjs/tracing/anthropic-ai/utils.js.map +1 -1
- package/build/cjs/tracing/google-genai/index.js +3 -3
- package/build/cjs/tracing/google-genai/index.js.map +1 -1
- package/build/cjs/tracing/google-genai/streaming.js +2 -2
- package/build/cjs/tracing/google-genai/streaming.js.map +1 -1
- package/build/cjs/tracing/langchain/index.js +4 -4
- package/build/cjs/tracing/langchain/index.js.map +1 -1
- package/build/cjs/tracing/langgraph/index.js +3 -3
- package/build/cjs/tracing/langgraph/index.js.map +1 -1
- package/build/cjs/tracing/openai/index.js +136 -53
- package/build/cjs/tracing/openai/index.js.map +1 -1
- package/build/cjs/tracing/openai/streaming.js +2 -2
- package/build/cjs/tracing/openai/streaming.js.map +1 -1
- package/build/cjs/tracing/sentrySpan.js +32 -0
- package/build/cjs/tracing/sentrySpan.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/constants.js +4 -0
- package/build/cjs/tracing/vercel-ai/constants.js.map +1 -1
- package/build/cjs/tracing/vercel-ai/index.js +14 -0
- package/build/cjs/tracing/vercel-ai/index.js.map +1 -1
- package/build/cjs/tracing/vercel-ai/utils.js +71 -22
- package/build/cjs/tracing/vercel-ai/utils.js.map +1 -1
- package/build/cjs/transports/base.js +18 -2
- package/build/cjs/transports/base.js.map +1 -1
- package/build/cjs/transports/offline.js +16 -17
- package/build/cjs/transports/offline.js.map +1 -1
- package/build/cjs/trpc.js +3 -3
- package/build/cjs/trpc.js.map +1 -1
- package/build/cjs/utils/aggregate-errors.js +13 -5
- package/build/cjs/utils/aggregate-errors.js.map +1 -1
- package/build/cjs/utils/beforeSendSpan.js +36 -0
- package/build/cjs/utils/beforeSendSpan.js.map +1 -0
- package/build/cjs/utils/envToBool.js +32 -0
- package/build/cjs/utils/envToBool.js.map +1 -0
- package/build/cjs/utils/exports.js +7 -7
- package/build/cjs/utils/exports.js.map +1 -1
- package/build/cjs/utils/featureFlags.js +1 -0
- package/build/cjs/utils/featureFlags.js.map +1 -1
- package/build/cjs/utils/flushIfServerless.js +2 -2
- package/build/cjs/utils/flushIfServerless.js.map +1 -1
- package/build/cjs/utils/hasSpanStreamingEnabled.js +21 -0
- package/build/cjs/utils/hasSpanStreamingEnabled.js.map +1 -0
- package/build/cjs/utils/prepareEvent.js +6 -1
- package/build/cjs/utils/prepareEvent.js.map +1 -1
- package/build/cjs/utils/promisebuffer.js +5 -3
- package/build/cjs/utils/promisebuffer.js.map +1 -1
- package/build/cjs/utils/scopeData.js +4 -0
- package/build/cjs/utils/scopeData.js.map +1 -1
- package/build/cjs/utils/sdkMetadata.js +7 -11
- package/build/cjs/utils/sdkMetadata.js.map +1 -1
- package/build/cjs/utils/should-ignore-span.js +31 -9
- package/build/cjs/utils/should-ignore-span.js.map +1 -1
- package/build/cjs/utils/spanUtils.js +90 -2
- package/build/cjs/utils/spanUtils.js.map +1 -1
- package/build/cjs/utils/timer.js +20 -0
- package/build/cjs/utils/timer.js.map +1 -0
- package/build/cjs/utils/traceData.js +2 -2
- package/build/cjs/utils/traceData.js.map +1 -1
- package/build/cjs/utils/tracePropagationTargets.js +38 -0
- package/build/cjs/utils/tracePropagationTargets.js.map +1 -0
- package/build/cjs/utils/version.js +1 -1
- package/build/cjs/utils/version.js.map +1 -1
- package/build/esm/attributes.js.map +1 -1
- package/build/esm/client.js +18 -8
- package/build/esm/client.js.map +1 -1
- package/build/esm/envelope.js +41 -8
- package/build/esm/envelope.js.map +1 -1
- package/build/esm/exports.js +2 -2
- package/build/esm/feedback.js +1 -1
- package/build/esm/index.js +12 -3
- package/build/esm/index.js.map +1 -1
- package/build/esm/integration.js +12 -1
- package/build/esm/integration.js.map +1 -1
- package/build/esm/integrations/eventFilters.js +1 -1
- package/build/esm/integrations/eventFilters.js.map +1 -1
- package/build/esm/integrations/mcp-server/correlation.js +54 -10
- package/build/esm/integrations/mcp-server/correlation.js.map +1 -1
- package/build/esm/integrations/mcp-server/sessionManagement.js +50 -16
- package/build/esm/integrations/mcp-server/sessionManagement.js.map +1 -1
- package/build/esm/integrations/moduleMetadata.js +1 -1
- package/build/esm/integrations/requestdata.js +72 -6
- package/build/esm/integrations/requestdata.js.map +1 -1
- package/build/esm/integrations/spanStreaming.js +52 -0
- package/build/esm/integrations/spanStreaming.js.map +1 -0
- package/build/esm/integrations/third-party-errors-filter.js +1 -1
- package/build/esm/logs/internal.js +1 -1
- package/build/esm/metrics/public-api.js +3 -3
- package/build/esm/metrics/public-api.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/esm/scope.js +1 -1
- package/build/esm/scope.js.map +1 -1
- package/build/esm/semanticAttributes.js +57 -1
- package/build/esm/semanticAttributes.js.map +1 -1
- package/build/esm/spans/captureSpan.js +102 -0
- package/build/esm/spans/captureSpan.js.map +1 -0
- package/build/esm/spans/spanBuffer.js +119 -0
- package/build/esm/spans/spanBuffer.js.map +1 -0
- package/build/esm/spans/spanFirstUtils.js +182 -0
- package/build/esm/spans/spanFirstUtils.js.map +1 -0
- 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/measurement.js +1 -1
- package/build/esm/tracing/openai/index.js +134 -51
- package/build/esm/tracing/openai/index.js.map +1 -1
- package/build/esm/tracing/sentrySpan.js +33 -1
- package/build/esm/tracing/sentrySpan.js.map +1 -1
- package/build/esm/tracing/trace.js +4 -3
- package/build/esm/tracing/trace.js.map +1 -1
- package/build/esm/tracing/vercel-ai/constants.js +4 -1
- package/build/esm/tracing/vercel-ai/constants.js.map +1 -1
- package/build/esm/tracing/vercel-ai/index.js +15 -1
- package/build/esm/tracing/vercel-ai/index.js.map +1 -1
- package/build/esm/tracing/vercel-ai/utils.js +73 -24
- package/build/esm/tracing/vercel-ai/utils.js.map +1 -1
- package/build/esm/transports/base.js +18 -2
- package/build/esm/transports/base.js.map +1 -1
- package/build/esm/transports/offline.js +16 -17
- package/build/esm/transports/offline.js.map +1 -1
- package/build/esm/utils/aggregate-errors.js +13 -5
- package/build/esm/utils/aggregate-errors.js.map +1 -1
- package/build/esm/utils/beforeSendSpan.js +33 -0
- package/build/esm/utils/beforeSendSpan.js.map +1 -0
- package/build/esm/utils/envToBool.js +28 -0
- package/build/esm/utils/envToBool.js.map +1 -0
- package/build/esm/utils/exports.js +7 -7
- package/build/esm/utils/exports.js.map +1 -1
- package/build/esm/utils/featureFlags.js +1 -0
- package/build/esm/utils/featureFlags.js.map +1 -1
- package/build/esm/utils/flushIfServerless.js.map +1 -1
- package/build/esm/utils/hasSpanStreamingEnabled.js +19 -0
- package/build/esm/utils/hasSpanStreamingEnabled.js.map +1 -0
- package/build/esm/utils/prepareEvent.js +6 -1
- package/build/esm/utils/prepareEvent.js.map +1 -1
- package/build/esm/utils/promisebuffer.js +5 -3
- package/build/esm/utils/promisebuffer.js.map +1 -1
- package/build/esm/utils/scopeData.js +4 -0
- package/build/esm/utils/scopeData.js.map +1 -1
- package/build/esm/utils/sdkMetadata.js +7 -11
- package/build/esm/utils/sdkMetadata.js.map +1 -1
- package/build/esm/utils/should-ignore-span.js +31 -9
- package/build/esm/utils/should-ignore-span.js.map +1 -1
- package/build/esm/utils/spanUtils.js +87 -3
- package/build/esm/utils/spanUtils.js.map +1 -1
- package/build/esm/utils/timer.js +18 -0
- package/build/esm/utils/timer.js.map +1 -0
- package/build/esm/utils/tracePropagationTargets.js +36 -0
- package/build/esm/utils/tracePropagationTargets.js.map +1 -0
- package/build/esm/utils/version.js +1 -1
- package/build/esm/utils/version.js.map +1 -1
- package/build/types/attributes.d.ts +1 -1
- package/build/types/attributes.d.ts.map +1 -1
- package/build/types/client.d.ts +40 -2
- package/build/types/client.d.ts.map +1 -1
- package/build/types/envelope.d.ts +6 -1
- package/build/types/envelope.d.ts.map +1 -1
- package/build/types/index.d.ts +13 -4
- package/build/types/index.d.ts.map +1 -1
- package/build/types/integration.d.ts +4 -0
- package/build/types/integration.d.ts.map +1 -1
- package/build/types/integrations/mcp-server/correlation.d.ts +6 -2
- package/build/types/integrations/mcp-server/correlation.d.ts.map +1 -1
- package/build/types/integrations/mcp-server/sessionManagement.d.ts +8 -2
- package/build/types/integrations/mcp-server/sessionManagement.d.ts.map +1 -1
- package/build/types/integrations/requestdata.d.ts.map +1 -1
- package/build/types/integrations/spanStreaming.d.ts +11 -0
- package/build/types/integrations/spanStreaming.d.ts.map +1 -0
- package/build/types/metrics/public-api.d.ts +3 -3
- package/build/types/semanticAttributes.d.ts +38 -0
- package/build/types/semanticAttributes.d.ts.map +1 -1
- package/build/types/spans/captureSpan.d.ts +10 -0
- package/build/types/spans/captureSpan.d.ts.map +1 -0
- package/build/types/spans/spanBuffer.d.ts +35 -0
- package/build/types/spans/spanBuffer.d.ts.map +1 -0
- package/build/types/spans/spanFirstUtils.d.ts +20 -0
- package/build/types/spans/spanFirstUtils.d.ts.map +1 -0
- package/build/types/tracing/ai/gen-ai-attributes.d.ts +4 -0
- package/build/types/tracing/ai/gen-ai-attributes.d.ts.map +1 -1
- package/build/types/tracing/openai/index.d.ts.map +1 -1
- package/build/types/tracing/sentrySpan.d.ts +10 -1
- package/build/types/tracing/sentrySpan.d.ts.map +1 -1
- package/build/types/tracing/vercel-ai/constants.d.ts +1 -0
- package/build/types/tracing/vercel-ai/constants.d.ts.map +1 -1
- package/build/types/tracing/vercel-ai/index.d.ts.map +1 -1
- package/build/types/tracing/vercel-ai/utils.d.ts +2 -2
- package/build/types/tracing/vercel-ai/utils.d.ts.map +1 -1
- package/build/types/transports/base.d.ts.map +1 -1
- package/build/types/transports/offline.d.ts.map +1 -1
- package/build/types/types-hoist/attributes.d.ts +19 -0
- package/build/types/types-hoist/attributes.d.ts.map +1 -0
- package/build/types/types-hoist/envelope.d.ts +22 -2
- package/build/types/types-hoist/envelope.d.ts.map +1 -1
- package/build/types/types-hoist/feedback/index.d.ts.map +1 -1
- package/build/types/types-hoist/integration.d.ts +7 -0
- package/build/types/types-hoist/integration.d.ts.map +1 -1
- package/build/types/types-hoist/link.d.ts +2 -2
- package/build/types/types-hoist/link.d.ts.map +1 -1
- package/build/types/types-hoist/options.d.ts +18 -2
- package/build/types/types-hoist/options.d.ts.map +1 -1
- package/build/types/types-hoist/span.d.ts +27 -0
- package/build/types/types-hoist/span.d.ts.map +1 -1
- package/build/types/utils/beforeSendSpan.d.ts +22 -0
- package/build/types/utils/beforeSendSpan.d.ts.map +1 -0
- package/build/types/utils/envToBool.d.ts +13 -0
- package/build/types/utils/envToBool.d.ts.map +1 -0
- package/build/types/utils/featureFlags.d.ts.map +1 -1
- package/build/types/utils/flushIfServerless.d.ts.map +1 -1
- package/build/types/utils/hasSpanStreamingEnabled.d.ts +9 -0
- package/build/types/utils/hasSpanStreamingEnabled.d.ts.map +1 -0
- package/build/types/utils/prepareEvent.d.ts.map +1 -1
- package/build/types/utils/promisebuffer.d.ts.map +1 -1
- package/build/types/utils/scopeData.d.ts.map +1 -1
- package/build/types/utils/sdkMetadata.d.ts.map +1 -1
- package/build/types/utils/should-ignore-span.d.ts +3 -3
- package/build/types/utils/should-ignore-span.d.ts.map +1 -1
- package/build/types/utils/spanUtils.d.ts +22 -2
- package/build/types/utils/spanUtils.d.ts.map +1 -1
- package/build/types/utils/timer.d.ts +11 -0
- package/build/types/utils/timer.d.ts.map +1 -0
- package/build/types/utils/tracePropagationTargets.d.ts +9 -0
- package/build/types/utils/tracePropagationTargets.d.ts.map +1 -0
- package/build/types-ts3.8/attributes.d.ts +1 -1
- package/build/types-ts3.8/client.d.ts +40 -2
- package/build/types-ts3.8/envelope.d.ts +6 -1
- package/build/types-ts3.8/index.d.ts +13 -4
- package/build/types-ts3.8/integration.d.ts +4 -0
- package/build/types-ts3.8/integrations/mcp-server/correlation.d.ts +6 -2
- package/build/types-ts3.8/integrations/mcp-server/sessionManagement.d.ts +8 -2
- package/build/types-ts3.8/integrations/spanStreaming.d.ts +11 -0
- package/build/types-ts3.8/metrics/public-api.d.ts +3 -3
- package/build/types-ts3.8/semanticAttributes.d.ts +38 -0
- package/build/types-ts3.8/spans/captureSpan.d.ts +10 -0
- package/build/types-ts3.8/spans/spanBuffer.d.ts +35 -0
- package/build/types-ts3.8/spans/spanFirstUtils.d.ts +20 -0
- package/build/types-ts3.8/tracing/ai/gen-ai-attributes.d.ts +4 -0
- package/build/types-ts3.8/tracing/sentrySpan.d.ts +10 -1
- package/build/types-ts3.8/tracing/vercel-ai/constants.d.ts +1 -0
- package/build/types-ts3.8/tracing/vercel-ai/utils.d.ts +2 -2
- package/build/types-ts3.8/types-hoist/attributes.d.ts +19 -0
- package/build/types-ts3.8/types-hoist/envelope.d.ts +22 -2
- package/build/types-ts3.8/types-hoist/integration.d.ts +7 -0
- package/build/types-ts3.8/types-hoist/link.d.ts +2 -2
- package/build/types-ts3.8/types-hoist/options.d.ts +18 -2
- package/build/types-ts3.8/types-hoist/span.d.ts +27 -0
- package/build/types-ts3.8/utils/beforeSendSpan.d.ts +22 -0
- package/build/types-ts3.8/utils/envToBool.d.ts +13 -0
- package/build/types-ts3.8/utils/hasSpanStreamingEnabled.d.ts +9 -0
- package/build/types-ts3.8/utils/should-ignore-span.d.ts +3 -3
- package/build/types-ts3.8/utils/spanUtils.d.ts +22 -2
- package/build/types-ts3.8/utils/timer.d.ts +11 -0
- package/build/types-ts3.8/utils/tracePropagationTargets.d.ts +9 -0
- package/package.json +1 -1
package/build/cjs/envelope.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
|
|
3
3
|
const dynamicSamplingContext = require('./tracing/dynamicSamplingContext.js');
|
|
4
|
+
const beforeSendSpan = require('./utils/beforeSendSpan.js');
|
|
4
5
|
const dsn = require('./utils/dsn.js');
|
|
5
6
|
const envelope = require('./utils/envelope.js');
|
|
6
7
|
const shouldIgnoreSpan = require('./utils/should-ignore-span.js');
|
|
@@ -97,10 +98,6 @@ function createEventEnvelope(
|
|
|
97
98
|
* Takes an optional client and runs spans through `beforeSendSpan` if available.
|
|
98
99
|
*/
|
|
99
100
|
function createSpanEnvelope(spans, client) {
|
|
100
|
-
function dscHasRequiredProps(dsc) {
|
|
101
|
-
return !!dsc.trace_id && !!dsc.public_key;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
101
|
// For the moment we'll obtain the DSC from the first span in the array
|
|
105
102
|
// This might need to be changed if we permit sending multiple spans from
|
|
106
103
|
// different segments in one envelope
|
|
@@ -115,7 +112,8 @@ function createSpanEnvelope(spans, client) {
|
|
|
115
112
|
...(!!tunnel && dsn$1 && { dsn: dsn.dsnToString(dsn$1) }),
|
|
116
113
|
};
|
|
117
114
|
|
|
118
|
-
const
|
|
115
|
+
const options = client?.getOptions();
|
|
116
|
+
const ignoreSpans = options?.ignoreSpans;
|
|
119
117
|
|
|
120
118
|
const filteredSpans = ignoreSpans?.length
|
|
121
119
|
? spans.filter(span => !shouldIgnoreSpan.shouldIgnoreSpan(spanUtils.spanToJSON(span), ignoreSpans))
|
|
@@ -126,10 +124,14 @@ function createSpanEnvelope(spans, client) {
|
|
|
126
124
|
client?.recordDroppedEvent('before_send', 'span', droppedSpans);
|
|
127
125
|
}
|
|
128
126
|
|
|
129
|
-
|
|
127
|
+
// checking against traceLifeCycle so that TS can infer the correct type for
|
|
128
|
+
// beforeSendSpan. This is a workaround for now as most likely, this entire function
|
|
129
|
+
// will be removed in the future (once we send standalone spans as spans v2)
|
|
130
|
+
const convertToSpanJSON = options?.beforeSendSpan
|
|
130
131
|
? (span) => {
|
|
131
132
|
const spanJson = spanUtils.spanToJSON(span);
|
|
132
|
-
const processedSpan =
|
|
133
|
+
const processedSpan =
|
|
134
|
+
!beforeSendSpan.isV2BeforeSendSpanCallback(options?.beforeSendSpan) && options?.beforeSendSpan?.(spanJson);
|
|
133
135
|
|
|
134
136
|
if (!processedSpan) {
|
|
135
137
|
spanUtils.showSpanDropWarning();
|
|
@@ -151,8 +153,40 @@ function createSpanEnvelope(spans, client) {
|
|
|
151
153
|
return envelope.createEnvelope(headers, items);
|
|
152
154
|
}
|
|
153
155
|
|
|
156
|
+
/**
|
|
157
|
+
* Creates a span v2 envelope
|
|
158
|
+
*/
|
|
159
|
+
function createSpanV2Envelope(
|
|
160
|
+
serializedSpans,
|
|
161
|
+
dsc,
|
|
162
|
+
client,
|
|
163
|
+
) {
|
|
164
|
+
const dsn$1 = client?.getDsn();
|
|
165
|
+
const tunnel = client?.getOptions().tunnel;
|
|
166
|
+
const sdk = client?.getOptions()._metadata?.sdk;
|
|
167
|
+
|
|
168
|
+
const headers = {
|
|
169
|
+
sent_at: new Date().toISOString(),
|
|
170
|
+
...(dscHasRequiredProps(dsc) && { trace: dsc }),
|
|
171
|
+
...(sdk && { sdk: sdk }),
|
|
172
|
+
...(!!tunnel && dsn$1 && { dsn: dsn.dsnToString(dsn$1) }),
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
const spanContainer = [
|
|
176
|
+
{ type: 'span', item_count: serializedSpans.length, content_type: 'application/vnd.sentry.items.span.v2+json' },
|
|
177
|
+
{ items: serializedSpans },
|
|
178
|
+
];
|
|
179
|
+
|
|
180
|
+
return envelope.createEnvelope(headers, [spanContainer]);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
function dscHasRequiredProps(dsc) {
|
|
184
|
+
return !!dsc.trace_id && !!dsc.public_key;
|
|
185
|
+
}
|
|
186
|
+
|
|
154
187
|
exports._enhanceEventWithSdkInfo = _enhanceEventWithSdkInfo;
|
|
155
188
|
exports.createEventEnvelope = createEventEnvelope;
|
|
156
189
|
exports.createSessionEnvelope = createSessionEnvelope;
|
|
157
190
|
exports.createSpanEnvelope = createSpanEnvelope;
|
|
191
|
+
exports.createSpanV2Envelope = createSpanV2Envelope;
|
|
158
192
|
//# sourceMappingURL=envelope.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"envelope.js","sources":["../../src/envelope.ts"],"sourcesContent":["import type { Client } from './client';\nimport { getDynamicSamplingContextFromSpan } from './tracing/dynamicSamplingContext';\nimport type { SentrySpan } from './tracing/sentrySpan';\nimport type { LegacyCSPReport } from './types-hoist/csp';\nimport type { DsnComponents } from './types-hoist/dsn';\nimport type {\n DynamicSamplingContext,\n EventEnvelope,\n EventItem,\n RawSecurityEnvelope,\n RawSecurityItem,\n SessionEnvelope,\n SessionItem,\n SpanEnvelope,\n SpanItem,\n} from './types-hoist/envelope';\nimport type { Event } from './types-hoist/event';\nimport type { SdkInfo } from './types-hoist/sdkinfo';\nimport type { SdkMetadata } from './types-hoist/sdkmetadata';\nimport type { Session, SessionAggregates } from './types-hoist/session';\nimport { dsnToString } from './utils/dsn';\nimport {\n createEnvelope,\n createEventEnvelopeHeaders,\n createSpanEnvelopeItem,\n getSdkMetadataForEnvelopeHeader,\n} from './utils/envelope';\nimport { uuid4 } from './utils/misc';\nimport { shouldIgnoreSpan } from './utils/should-ignore-span';\nimport { showSpanDropWarning, spanToJSON } from './utils/spanUtils';\n\n/**\n * Apply SdkInfo (name, version, packages, integrations) to the corresponding event key.\n * Merge with existing data if any.\n *\n * @internal, exported only for testing\n **/\nexport function _enhanceEventWithSdkInfo(event: Event, newSdkInfo?: SdkInfo): Event {\n if (!newSdkInfo) {\n return event;\n }\n\n const eventSdkInfo = event.sdk || {};\n\n event.sdk = {\n ...eventSdkInfo,\n name: eventSdkInfo.name || newSdkInfo.name,\n version: eventSdkInfo.version || newSdkInfo.version,\n integrations: [...(event.sdk?.integrations || []), ...(newSdkInfo.integrations || [])],\n packages: [...(event.sdk?.packages || []), ...(newSdkInfo.packages || [])],\n settings:\n event.sdk?.settings || newSdkInfo.settings\n ? {\n ...event.sdk?.settings,\n ...newSdkInfo.settings,\n }\n : undefined,\n };\n\n return event;\n}\n\n/** Creates an envelope from a Session */\nexport function createSessionEnvelope(\n session: Session | SessionAggregates,\n dsn?: DsnComponents,\n metadata?: SdkMetadata,\n tunnel?: string,\n): SessionEnvelope {\n const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);\n const envelopeHeaders = {\n sent_at: new Date().toISOString(),\n ...(sdkInfo && { sdk: sdkInfo }),\n ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n };\n\n const envelopeItem: SessionItem =\n 'aggregates' in session ? [{ type: 'sessions' }, session] : [{ type: 'session' }, session.toJSON()];\n\n return createEnvelope<SessionEnvelope>(envelopeHeaders, [envelopeItem]);\n}\n\n/**\n * Create an Envelope from an event.\n */\nexport function createEventEnvelope(\n event: Event,\n dsn?: DsnComponents,\n metadata?: SdkMetadata,\n tunnel?: string,\n): EventEnvelope {\n const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);\n\n /*\n Note: Due to TS, event.type may be `replay_event`, theoretically.\n In practice, we never call `createEventEnvelope` with `replay_event` type,\n and we'd have to adjust a looot of types to make this work properly.\n We want to avoid casting this around, as that could lead to bugs (e.g. when we add another type)\n So the safe choice is to really guard against the replay_event type here.\n */\n const eventType = event.type && event.type !== 'replay_event' ? event.type : 'event';\n\n _enhanceEventWithSdkInfo(event, metadata?.sdk);\n\n const envelopeHeaders = createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn);\n\n // Prevent this data (which, if it exists, was used in earlier steps in the processing pipeline) from being sent to\n // sentry. (Note: Our use of this property comes and goes with whatever we might be debugging, whatever hacks we may\n // have temporarily added, etc. Even if we don't happen to be using it at some point in the future, let's not get rid\n // of this `delete`, lest we miss putting it back in the next time the property is in use.)\n delete event.sdkProcessingMetadata;\n\n const eventItem: EventItem = [{ type: eventType }, event];\n return createEnvelope<EventEnvelope>(envelopeHeaders, [eventItem]);\n}\n\n/**\n * Create envelope from Span item.\n *\n * Takes an optional client and runs spans through `beforeSendSpan` if available.\n */\nexport function createSpanEnvelope(spans: [SentrySpan, ...SentrySpan[]], client?: Client): SpanEnvelope {\n function dscHasRequiredProps(dsc: Partial<DynamicSamplingContext>): dsc is DynamicSamplingContext {\n return !!dsc.trace_id && !!dsc.public_key;\n }\n\n // For the moment we'll obtain the DSC from the first span in the array\n // This might need to be changed if we permit sending multiple spans from\n // different segments in one envelope\n const dsc = getDynamicSamplingContextFromSpan(spans[0]);\n\n const dsn = client?.getDsn();\n const tunnel = client?.getOptions().tunnel;\n\n const headers: SpanEnvelope[0] = {\n sent_at: new Date().toISOString(),\n ...(dscHasRequiredProps(dsc) && { trace: dsc }),\n ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n };\n\n const { beforeSendSpan, ignoreSpans } = client?.getOptions() || {};\n\n const filteredSpans = ignoreSpans?.length\n ? spans.filter(span => !shouldIgnoreSpan(spanToJSON(span), ignoreSpans))\n : spans;\n const droppedSpans = spans.length - filteredSpans.length;\n\n if (droppedSpans) {\n client?.recordDroppedEvent('before_send', 'span', droppedSpans);\n }\n\n const convertToSpanJSON = beforeSendSpan\n ? (span: SentrySpan) => {\n const spanJson = spanToJSON(span);\n const processedSpan = beforeSendSpan(spanJson);\n\n if (!processedSpan) {\n showSpanDropWarning();\n return spanJson;\n }\n\n return processedSpan;\n }\n : spanToJSON;\n\n const items: SpanItem[] = [];\n for (const span of filteredSpans) {\n const spanJson = convertToSpanJSON(span);\n if (spanJson) {\n items.push(createSpanEnvelopeItem(spanJson));\n }\n }\n\n return createEnvelope<SpanEnvelope>(headers, items);\n}\n\n/**\n * Create an Envelope from a CSP report.\n */\nexport function createRawSecurityEnvelope(\n report: LegacyCSPReport,\n dsn: DsnComponents,\n tunnel?: string,\n release?: string,\n environment?: string,\n): RawSecurityEnvelope {\n const envelopeHeaders = {\n event_id: uuid4(),\n ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n };\n\n const eventItem: RawSecurityItem = [\n { type: 'raw_security', sentry_release: release, sentry_environment: environment },\n report,\n ];\n\n return createEnvelope<RawSecurityEnvelope>(envelopeHeaders, [eventItem]);\n}\n"],"names":["dsn","getSdkMetadataForEnvelopeHeader","dsnToString","createEnvelope","createEventEnvelopeHeaders","getDynamicSamplingContextFromSpan","shouldIgnoreSpan","spanToJSON","showSpanDropWarning","createSpanEnvelopeItem"],"mappings":";;;;;;;;AA+BA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,wBAAwB,CAAC,KAAK,EAAS,UAAU,EAAmB;AACpF,EAAE,IAAI,CAAC,UAAU,EAAE;AACnB,IAAI,OAAO,KAAK;AAChB,EAAE;;AAEF,EAAE,MAAM,eAAe,KAAK,CAAC,GAAA,IAAO,EAAE;;AAEtC,EAAE,KAAK,CAAC,GAAA,GAAM;AACd,IAAI,GAAG,YAAY;AACnB,IAAI,IAAI,EAAE,YAAY,CAAC,QAAQ,UAAU,CAAC,IAAI;AAC9C,IAAI,OAAO,EAAE,YAAY,CAAC,WAAW,UAAU,CAAC,OAAO;AACvD,IAAI,YAAY,EAAE,CAAC,IAAI,KAAK,CAAC,GAAG,EAAE,YAAA,IAAgB,EAAE,CAAC,EAAE,IAAI,UAAU,CAAC,gBAAgB,EAAE,CAAC,CAAC;AAC1F,IAAI,QAAQ,EAAE,CAAC,IAAI,KAAK,CAAC,GAAG,EAAE,QAAA,IAAY,EAAE,CAAC,EAAE,IAAI,UAAU,CAAC,YAAY,EAAE,CAAC,CAAC;AAC9E,IAAI,QAAQ;AACZ,MAAM,KAAK,CAAC,GAAG,EAAE,QAAA,IAAY,UAAU,CAAC;AACxC,UAAU;AACV,YAAY,GAAG,KAAK,CAAC,GAAG,EAAE,QAAQ;AAClC,YAAY,GAAG,UAAU,CAAC,QAAQ;AAClC;AACA,UAAU,SAAS;AACnB,GAAG;;AAEH,EAAE,OAAO,KAAK;AACd;;AAEA;AACO,SAAS,qBAAq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AE1D,EAAE,IAAI,YAAY,EAAE;AACpB,IAAI,MAAM,EAAE,kBAAkB,CAAC,aAAa,EAAE,MAAM,EAAE,YAAY,CAAC;AACnE,EAAE;;AAEF,EAAE,MAAM,oBAAoB;AAC5B,MAAM,CAAC,IAAI,KAAiB;AAC5B,QAAQ,MAAM,QAAA,GAAWA,oBAAU,CAAC,IAAI,CAAC;AACzC,QAAQ,MAAM,aAAA,GAAgB,cAAc,CAAC,QAAQ,CAAC;;AAEtD,QAAQ,IAAI,CAAC,aAAa,EAAE;AAC5B,UAAUC,6BAAmB,EAAE;AAC/B,UAAU,OAAO,QAAQ;AACzB,QAAQ;;AAER,QAAQ,OAAO,aAAa;AAC5B,MAAM;AACN,MAAMD,oBAAU;;AAEhB,EAAE,MAAM,KAAK,GAAe,EAAE;AAC9B,EAAE,KAAK,MAAM,IAAA,IAAQ,aAAa,EAAE;AACpC,IAAI,MAAM,QAAA,GAAW,iBAAiB,CAAC,IAAI,CAAC;AAC5C,IAAI,IAAI,QAAQ,EAAE;AAClB,MAAM,KAAK,CAAC,IAAI,CAACE,+BAAsB,CAAC,QAAQ,CAAC,CAAC;AAClD,IAAI;AACJ,EAAE;;AAEF,EAAE,OAAON,uBAAc,CAAe,OAAO,EAAE,KAAK,CAAC;AACrD;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"envelope.js","sources":["../../src/envelope.ts"],"sourcesContent":["import type { Client } from './client';\nimport { getDynamicSamplingContextFromSpan } from './tracing/dynamicSamplingContext';\nimport type { SentrySpan } from './tracing/sentrySpan';\nimport type { LegacyCSPReport } from './types-hoist/csp';\nimport type { DsnComponents } from './types-hoist/dsn';\nimport type {\n DynamicSamplingContext,\n EventEnvelope,\n EventItem,\n RawSecurityEnvelope,\n RawSecurityItem,\n SessionEnvelope,\n SessionItem,\n SpanContainerItem,\n SpanEnvelope,\n SpanItem,\n SpanV2Envelope,\n} from './types-hoist/envelope';\nimport type { Event } from './types-hoist/event';\nimport type { SdkInfo } from './types-hoist/sdkinfo';\nimport type { SdkMetadata } from './types-hoist/sdkmetadata';\nimport type { Session, SessionAggregates } from './types-hoist/session';\nimport type { SpanV2JSON } from './types-hoist/span';\nimport { isV2BeforeSendSpanCallback } from './utils/beforeSendSpan';\nimport { dsnToString } from './utils/dsn';\nimport {\n createEnvelope,\n createEventEnvelopeHeaders,\n createSpanEnvelopeItem,\n getSdkMetadataForEnvelopeHeader,\n} from './utils/envelope';\nimport { uuid4 } from './utils/misc';\nimport { shouldIgnoreSpan } from './utils/should-ignore-span';\nimport { showSpanDropWarning, spanToJSON } from './utils/spanUtils';\n\n/**\n * Apply SdkInfo (name, version, packages, integrations) to the corresponding event key.\n * Merge with existing data if any.\n *\n * @internal, exported only for testing\n **/\nexport function _enhanceEventWithSdkInfo(event: Event, newSdkInfo?: SdkInfo): Event {\n if (!newSdkInfo) {\n return event;\n }\n\n const eventSdkInfo = event.sdk || {};\n\n event.sdk = {\n ...eventSdkInfo,\n name: eventSdkInfo.name || newSdkInfo.name,\n version: eventSdkInfo.version || newSdkInfo.version,\n integrations: [...(event.sdk?.integrations || []), ...(newSdkInfo.integrations || [])],\n packages: [...(event.sdk?.packages || []), ...(newSdkInfo.packages || [])],\n settings:\n event.sdk?.settings || newSdkInfo.settings\n ? {\n ...event.sdk?.settings,\n ...newSdkInfo.settings,\n }\n : undefined,\n };\n\n return event;\n}\n\n/** Creates an envelope from a Session */\nexport function createSessionEnvelope(\n session: Session | SessionAggregates,\n dsn?: DsnComponents,\n metadata?: SdkMetadata,\n tunnel?: string,\n): SessionEnvelope {\n const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);\n const envelopeHeaders = {\n sent_at: new Date().toISOString(),\n ...(sdkInfo && { sdk: sdkInfo }),\n ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n };\n\n const envelopeItem: SessionItem =\n 'aggregates' in session ? [{ type: 'sessions' }, session] : [{ type: 'session' }, session.toJSON()];\n\n return createEnvelope<SessionEnvelope>(envelopeHeaders, [envelopeItem]);\n}\n\n/**\n * Create an Envelope from an event.\n */\nexport function createEventEnvelope(\n event: Event,\n dsn?: DsnComponents,\n metadata?: SdkMetadata,\n tunnel?: string,\n): EventEnvelope {\n const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);\n\n /*\n Note: Due to TS, event.type may be `replay_event`, theoretically.\n In practice, we never call `createEventEnvelope` with `replay_event` type,\n and we'd have to adjust a looot of types to make this work properly.\n We want to avoid casting this around, as that could lead to bugs (e.g. when we add another type)\n So the safe choice is to really guard against the replay_event type here.\n */\n const eventType = event.type && event.type !== 'replay_event' ? event.type : 'event';\n\n _enhanceEventWithSdkInfo(event, metadata?.sdk);\n\n const envelopeHeaders = createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn);\n\n // Prevent this data (which, if it exists, was used in earlier steps in the processing pipeline) from being sent to\n // sentry. (Note: Our use of this property comes and goes with whatever we might be debugging, whatever hacks we may\n // have temporarily added, etc. Even if we don't happen to be using it at some point in the future, let's not get rid\n // of this `delete`, lest we miss putting it back in the next time the property is in use.)\n delete event.sdkProcessingMetadata;\n\n const eventItem: EventItem = [{ type: eventType }, event];\n return createEnvelope<EventEnvelope>(envelopeHeaders, [eventItem]);\n}\n\n/**\n * Create envelope from Span item.\n *\n * Takes an optional client and runs spans through `beforeSendSpan` if available.\n */\nexport function createSpanEnvelope(spans: [SentrySpan, ...SentrySpan[]], client?: Client): SpanEnvelope {\n // For the moment we'll obtain the DSC from the first span in the array\n // This might need to be changed if we permit sending multiple spans from\n // different segments in one envelope\n const dsc = getDynamicSamplingContextFromSpan(spans[0]);\n\n const dsn = client?.getDsn();\n const tunnel = client?.getOptions().tunnel;\n\n const headers: SpanEnvelope[0] = {\n sent_at: new Date().toISOString(),\n ...(dscHasRequiredProps(dsc) && { trace: dsc }),\n ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n };\n\n const options = client?.getOptions();\n const ignoreSpans = options?.ignoreSpans;\n\n const filteredSpans = ignoreSpans?.length\n ? spans.filter(span => !shouldIgnoreSpan(spanToJSON(span), ignoreSpans))\n : spans;\n const droppedSpans = spans.length - filteredSpans.length;\n\n if (droppedSpans) {\n client?.recordDroppedEvent('before_send', 'span', droppedSpans);\n }\n\n // checking against traceLifeCycle so that TS can infer the correct type for\n // beforeSendSpan. This is a workaround for now as most likely, this entire function\n // will be removed in the future (once we send standalone spans as spans v2)\n const convertToSpanJSON = options?.beforeSendSpan\n ? (span: SentrySpan) => {\n const spanJson = spanToJSON(span);\n const processedSpan =\n !isV2BeforeSendSpanCallback(options?.beforeSendSpan) && options?.beforeSendSpan?.(spanJson);\n\n if (!processedSpan) {\n showSpanDropWarning();\n return spanJson;\n }\n\n return processedSpan;\n }\n : spanToJSON;\n\n const items: SpanItem[] = [];\n for (const span of filteredSpans) {\n const spanJson = convertToSpanJSON(span);\n if (spanJson) {\n items.push(createSpanEnvelopeItem(spanJson));\n }\n }\n\n return createEnvelope<SpanEnvelope>(headers, items);\n}\n\n/**\n * Creates a span v2 envelope\n */\nexport function createSpanV2Envelope(\n serializedSpans: SpanV2JSON[],\n dsc: Partial<DynamicSamplingContext>,\n client: Client,\n): SpanV2Envelope {\n const dsn = client?.getDsn();\n const tunnel = client?.getOptions().tunnel;\n const sdk = client?.getOptions()._metadata?.sdk;\n\n const headers: SpanV2Envelope[0] = {\n sent_at: new Date().toISOString(),\n ...(dscHasRequiredProps(dsc) && { trace: dsc }),\n ...(sdk && { sdk: sdk }),\n ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n };\n\n const spanContainer: SpanContainerItem = [\n { type: 'span', item_count: serializedSpans.length, content_type: 'application/vnd.sentry.items.span.v2+json' },\n { items: serializedSpans },\n ];\n\n return createEnvelope<SpanV2Envelope>(headers, [spanContainer]);\n}\n\n/**\n * Create an Envelope from a CSP report.\n */\nexport function createRawSecurityEnvelope(\n report: LegacyCSPReport,\n dsn: DsnComponents,\n tunnel?: string,\n release?: string,\n environment?: string,\n): RawSecurityEnvelope {\n const envelopeHeaders = {\n event_id: uuid4(),\n ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n };\n\n const eventItem: RawSecurityItem = [\n { type: 'raw_security', sentry_release: release, sentry_environment: environment },\n report,\n ];\n\n return createEnvelope<RawSecurityEnvelope>(envelopeHeaders, [eventItem]);\n}\n\nfunction dscHasRequiredProps(dsc: Partial<DynamicSamplingContext>): dsc is DynamicSamplingContext {\n return !!dsc.trace_id && !!dsc.public_key;\n}\n"],"names":["dsn","getSdkMetadataForEnvelopeHeader","dsnToString","createEnvelope","createEventEnvelopeHeaders","getDynamicSamplingContextFromSpan","shouldIgnoreSpan","spanToJSON","isV2BeforeSendSpanCallback","showSpanDropWarning","createSpanEnvelopeItem"],"mappings":";;;;;;;;;AAmCA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,wBAAwB,CAAC,KAAK,EAAS,UAAU,EAAmB;AACpF,EAAE,IAAI,CAAC,UAAU,EAAE;AACnB,IAAI,OAAO,KAAK;AAChB,EAAE;;AAEF,EAAE,MAAM,eAAe,KAAK,CAAC,GAAA,IAAO,EAAE;;AAEtC,EAAE,KAAK,CAAC,GAAA,GAAM;AACd,IAAI,GAAG,YAAY;AACnB,IAAI,IAAI,EAAE,YAAY,CAAC,QAAQ,UAAU,CAAC,IAAI;AAC9C,IAAI,OAAO,EAAE,YAAY,CAAC,WAAW,UAAU,CAAC,OAAO;AACvD,IAAI,YAAY,EAAE,CAAC,IAAI,KAAK,CAAC,GAAG,EAAE,YAAA,IAAgB,EAAE,CAAC,EAAE,IAAI,UAAU,CAAC,gBAAgB,EAAE,CAAC,CAAC;AAC1F,IAAI,QAAQ,EAAE,CAAC,IAAI,KAAK,CAAC,GAAG,EAAE,QAAA,IAAY,EAAE,CAAC,EAAE,IAAI,UAAU,CAAC,YAAY,EAAE,CAAC,CAAC;AAC9E,IAAI,QAAQ;AACZ,MAAM,KAAK,CAAC,GAAG,EAAE,QAAA,IAAY,UAAU,CAAC;AACxC,UAAU;AACV,YAAY,GAAG,KAAK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AM,OAAO,GAAsB;AACrC,IAAI,OAAO,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;AACrC,IAAI,IAAI,mBAAmB,CAAC,GAAG,CAAA,IAAK,EAAE,KAAK,EAAE,GAAA,EAAK,CAAC;AACnD,IAAI,IAAI,GAAA,IAAO,EAAE,GAAG,EAAE,GAAA,EAAK,CAAC;AAC5B,IAAI,IAAI,CAAC,CAAC,MAAA,IAAUA,KAAA,IAAO,EAAE,GAAG,EAAEE,eAAW,CAACF,KAAG,CAAA,EAAG,CAAC;AACrD,GAAG;;AAEH,EAAE,MAAM,aAAa,GAAsB;AAC3C,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,eAAe,CAAC,MAAM,EAAE,YAAY,EAAE,6CAA6C;AACnH,IAAI,EAAE,KAAK,EAAE,eAAA,EAAiB;AAC9B,GAAG;;AAEH,EAAE,OAAOG,uBAAc,CAAiB,OAAO,EAAE,CAAC,aAAa,CAAC,CAAC;AACjE;;AAyBA,SAAS,mBAAmB,CAAC,GAAG,EAAkE;AAClG,EAAE,OAAO,CAAC,CAAC,GAAG,CAAC,QAAA,IAAY,CAAC,CAAC,GAAG,CAAC,UAAU;AAC3C;;;;;;;;"}
|
package/build/cjs/index.js
CHANGED
|
@@ -12,11 +12,11 @@ const measurement = require('./tracing/measurement.js');
|
|
|
12
12
|
const sampling = require('./tracing/sampling.js');
|
|
13
13
|
const logSpans = require('./tracing/logSpans.js');
|
|
14
14
|
const semanticAttributes = require('./semanticAttributes.js');
|
|
15
|
-
const envelope = require('./envelope.js');
|
|
16
|
-
const
|
|
15
|
+
const envelope$1 = require('./envelope.js');
|
|
16
|
+
const _exports = require('./exports.js');
|
|
17
17
|
const currentScopes = require('./currentScopes.js');
|
|
18
18
|
const defaultScopes = require('./defaultScopes.js');
|
|
19
|
-
const index = require('./asyncContext/index.js');
|
|
19
|
+
const index$6 = require('./asyncContext/index.js');
|
|
20
20
|
const carrier = require('./carrier.js');
|
|
21
21
|
const session = require('./session.js');
|
|
22
22
|
const scope = require('./scope.js');
|
|
@@ -30,23 +30,29 @@ const offline = require('./transports/offline.js');
|
|
|
30
30
|
const multiplexed = require('./transports/multiplexed.js');
|
|
31
31
|
const integration = require('./integration.js');
|
|
32
32
|
const providerSkip = require('./utils/ai/providerSkip.js');
|
|
33
|
+
const envToBool = require('./utils/envToBool.js');
|
|
33
34
|
const scopeData = require('./utils/scopeData.js');
|
|
34
35
|
const prepareEvent = require('./utils/prepareEvent.js');
|
|
35
36
|
const checkin = require('./checkin.js');
|
|
36
37
|
const hasSpansEnabled = require('./utils/hasSpansEnabled.js');
|
|
38
|
+
const hasSpanStreamingEnabled = require('./utils/hasSpanStreamingEnabled.js');
|
|
37
39
|
const isSentryRequestUrl = require('./utils/isSentryRequestUrl.js');
|
|
38
40
|
const handleCallbackErrors = require('./utils/handleCallbackErrors.js');
|
|
39
41
|
const parameterize = require('./utils/parameterize.js');
|
|
40
42
|
const ipAddress = require('./utils/ipAddress.js');
|
|
41
43
|
const spanUtils = require('./utils/spanUtils.js');
|
|
44
|
+
const captureSpan = require('./spans/captureSpan.js');
|
|
45
|
+
const spanFirstUtils = require('./spans/spanFirstUtils.js');
|
|
46
|
+
const spanBuffer = require('./spans/spanBuffer.js');
|
|
42
47
|
const spanOnScope = require('./utils/spanOnScope.js');
|
|
43
48
|
const parseSampleRate = require('./utils/parseSampleRate.js');
|
|
44
49
|
const sdkMetadata = require('./utils/sdkMetadata.js');
|
|
45
50
|
const traceData = require('./utils/traceData.js');
|
|
51
|
+
const tracePropagationTargets = require('./utils/tracePropagationTargets.js');
|
|
46
52
|
const meta = require('./utils/meta.js');
|
|
47
53
|
const debounce = require('./utils/debounce.js');
|
|
48
54
|
const request = require('./utils/request.js');
|
|
49
|
-
const constants = require('./constants.js');
|
|
55
|
+
const constants$1 = require('./constants.js');
|
|
50
56
|
const breadcrumbs = require('./breadcrumbs.js');
|
|
51
57
|
const functiontostring = require('./integrations/functiontostring.js');
|
|
52
58
|
const eventFilters = require('./integrations/eventFilters.js');
|
|
@@ -60,14 +66,15 @@ const rewriteframes = require('./integrations/rewriteframes.js');
|
|
|
60
66
|
const supabase = require('./integrations/supabase.js');
|
|
61
67
|
const zoderrors = require('./integrations/zoderrors.js');
|
|
62
68
|
const thirdPartyErrorsFilter = require('./integrations/third-party-errors-filter.js');
|
|
63
|
-
const console = require('./integrations/console.js');
|
|
69
|
+
const console$1 = require('./integrations/console.js');
|
|
64
70
|
const featureFlagsIntegration = require('./integrations/featureFlags/featureFlagsIntegration.js');
|
|
65
71
|
const growthbook = require('./integrations/featureFlags/growthbook.js');
|
|
66
72
|
const conversationId = require('./integrations/conversationId.js');
|
|
73
|
+
const spanStreaming = require('./integrations/spanStreaming.js');
|
|
67
74
|
const profiling = require('./profiling.js');
|
|
68
|
-
const fetch = require('./fetch.js');
|
|
75
|
+
const fetch$1 = require('./fetch.js');
|
|
69
76
|
const trpc = require('./trpc.js');
|
|
70
|
-
const index$
|
|
77
|
+
const index$7 = require('./integrations/mcp-server/index.js');
|
|
71
78
|
const feedback = require('./feedback.js');
|
|
72
79
|
const internal = require('./logs/internal.js');
|
|
73
80
|
const publicApi = require('./logs/public-api.js');
|
|
@@ -75,18 +82,18 @@ const consoleIntegration = require('./logs/console-integration.js');
|
|
|
75
82
|
const internal$1 = require('./metrics/internal.js');
|
|
76
83
|
const publicApi$1 = require('./metrics/public-api.js');
|
|
77
84
|
const consola = require('./integrations/consola.js');
|
|
78
|
-
const index
|
|
85
|
+
const index = require('./tracing/vercel-ai/index.js');
|
|
79
86
|
const utils = require('./tracing/vercel-ai/utils.js');
|
|
80
|
-
const index$
|
|
81
|
-
const constants$
|
|
82
|
-
const index$
|
|
83
|
-
const constants
|
|
84
|
-
const index$
|
|
85
|
-
const constants$
|
|
86
|
-
const index$
|
|
87
|
-
const constants$
|
|
88
|
-
const index$
|
|
89
|
-
const constants$
|
|
87
|
+
const index$5 = require('./tracing/openai/index.js');
|
|
88
|
+
const constants$5 = require('./tracing/openai/constants.js');
|
|
89
|
+
const index$2 = require('./tracing/anthropic-ai/index.js');
|
|
90
|
+
const constants = require('./tracing/anthropic-ai/constants.js');
|
|
91
|
+
const index$3 = require('./tracing/google-genai/index.js');
|
|
92
|
+
const constants$2 = require('./tracing/google-genai/constants.js');
|
|
93
|
+
const index$1 = require('./tracing/langchain/index.js');
|
|
94
|
+
const constants$3 = require('./tracing/langchain/constants.js');
|
|
95
|
+
const index$4 = require('./tracing/langgraph/index.js');
|
|
96
|
+
const constants$4 = require('./tracing/langgraph/constants.js');
|
|
90
97
|
const featureFlags = require('./utils/featureFlags.js');
|
|
91
98
|
const aggregateErrors = require('./utils/aggregate-errors.js');
|
|
92
99
|
const breadcrumbLogLevel = require('./utils/breadcrumb-log-level.js');
|
|
@@ -94,8 +101,8 @@ const browser = require('./utils/browser.js');
|
|
|
94
101
|
const dsn = require('./utils/dsn.js');
|
|
95
102
|
const error = require('./utils/error.js');
|
|
96
103
|
const worldwide = require('./utils/worldwide.js');
|
|
97
|
-
const console
|
|
98
|
-
const fetch
|
|
104
|
+
const console = require('./instrument/console.js');
|
|
105
|
+
const fetch = require('./instrument/fetch.js');
|
|
99
106
|
const globalError = require('./instrument/globalError.js');
|
|
100
107
|
const globalUnhandledRejection = require('./instrument/globalUnhandledRejection.js');
|
|
101
108
|
const handlers = require('./instrument/handlers.js');
|
|
@@ -109,7 +116,7 @@ const object = require('./utils/object.js');
|
|
|
109
116
|
const path = require('./utils/path.js');
|
|
110
117
|
const promisebuffer = require('./utils/promisebuffer.js');
|
|
111
118
|
const severity = require('./utils/severity.js');
|
|
112
|
-
const
|
|
119
|
+
const _exports$1 = require('./utils/exports.js');
|
|
113
120
|
const stacktrace = require('./utils/stacktrace.js');
|
|
114
121
|
const nodeStackTrace = require('./utils/node-stack-trace.js');
|
|
115
122
|
const string = require('./utils/string.js');
|
|
@@ -118,7 +125,7 @@ const syncpromise = require('./utils/syncpromise.js');
|
|
|
118
125
|
const time = require('./utils/time.js');
|
|
119
126
|
const tracing = require('./utils/tracing.js');
|
|
120
127
|
const env = require('./utils/env.js');
|
|
121
|
-
const envelope
|
|
128
|
+
const envelope = require('./utils/envelope.js');
|
|
122
129
|
const clientreport = require('./utils/clientreport.js');
|
|
123
130
|
const ratelimit = require('./utils/ratelimit.js');
|
|
124
131
|
const baggage = require('./utils/baggage.js');
|
|
@@ -133,6 +140,8 @@ const version = require('./utils/version.js');
|
|
|
133
140
|
const debugIds = require('./utils/debug-ids.js');
|
|
134
141
|
const metadata = require('./metadata.js');
|
|
135
142
|
const escapeStringForRegex = require('./vendor/escapeStringForRegex.js');
|
|
143
|
+
const beforeSendSpan = require('./utils/beforeSendSpan.js');
|
|
144
|
+
const shouldIgnoreSpan = require('./utils/should-ignore-span.js');
|
|
136
145
|
const randomSafeContext = require('./utils/randomSafeContext.js');
|
|
137
146
|
|
|
138
147
|
|
|
@@ -166,47 +175,76 @@ exports.sampleSpan = sampling.sampleSpan;
|
|
|
166
175
|
exports.logSpanEnd = logSpans.logSpanEnd;
|
|
167
176
|
exports.logSpanStart = logSpans.logSpanStart;
|
|
168
177
|
exports.GEN_AI_CONVERSATION_ID_ATTRIBUTE = semanticAttributes.GEN_AI_CONVERSATION_ID_ATTRIBUTE;
|
|
178
|
+
exports.SEMANTIC_ATTRIBUTE_BROWSER_CONNECTION_RTT = semanticAttributes.SEMANTIC_ATTRIBUTE_BROWSER_CONNECTION_RTT;
|
|
169
179
|
exports.SEMANTIC_ATTRIBUTE_CACHE_HIT = semanticAttributes.SEMANTIC_ATTRIBUTE_CACHE_HIT;
|
|
170
180
|
exports.SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE = semanticAttributes.SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE;
|
|
171
181
|
exports.SEMANTIC_ATTRIBUTE_CACHE_KEY = semanticAttributes.SEMANTIC_ATTRIBUTE_CACHE_KEY;
|
|
172
182
|
exports.SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME = semanticAttributes.SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME;
|
|
173
183
|
exports.SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD = semanticAttributes.SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD;
|
|
184
|
+
exports.SEMANTIC_ATTRIBUTE_HTTP_REQUEST_TIME_TO_FIRST_BYTE = semanticAttributes.SEMANTIC_ATTRIBUTE_HTTP_REQUEST_TIME_TO_FIRST_BYTE;
|
|
174
185
|
exports.SEMANTIC_ATTRIBUTE_PROFILE_ID = semanticAttributes.SEMANTIC_ATTRIBUTE_PROFILE_ID;
|
|
175
186
|
exports.SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME;
|
|
187
|
+
exports.SEMANTIC_ATTRIBUTE_SENTRY_ENVIRONMENT = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ENVIRONMENT;
|
|
176
188
|
exports.SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON;
|
|
177
189
|
exports.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT;
|
|
178
190
|
exports.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE;
|
|
179
191
|
exports.SEMANTIC_ATTRIBUTE_SENTRY_OP = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_OP;
|
|
180
192
|
exports.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN;
|
|
181
193
|
exports.SEMANTIC_ATTRIBUTE_SENTRY_PREVIOUS_TRACE_SAMPLE_RATE = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_PREVIOUS_TRACE_SAMPLE_RATE;
|
|
194
|
+
exports.SEMANTIC_ATTRIBUTE_SENTRY_RELEASE = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_RELEASE;
|
|
182
195
|
exports.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE;
|
|
196
|
+
exports.SEMANTIC_ATTRIBUTE_SENTRY_SDK_NAME = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SDK_NAME;
|
|
197
|
+
exports.SEMANTIC_ATTRIBUTE_SENTRY_SDK_VERSION = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SDK_VERSION;
|
|
198
|
+
exports.SEMANTIC_ATTRIBUTE_SENTRY_SEGMENT_ID = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SEGMENT_ID;
|
|
199
|
+
exports.SEMANTIC_ATTRIBUTE_SENTRY_SEGMENT_NAME = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SEGMENT_NAME;
|
|
183
200
|
exports.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE;
|
|
201
|
+
exports.SEMANTIC_ATTRIBUTE_SENTRY_SPAN_SOURCE = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SPAN_SOURCE;
|
|
184
202
|
exports.SEMANTIC_ATTRIBUTE_URL_FULL = semanticAttributes.SEMANTIC_ATTRIBUTE_URL_FULL;
|
|
203
|
+
exports.SEMANTIC_ATTRIBUTE_URL_QUERY = semanticAttributes.SEMANTIC_ATTRIBUTE_URL_QUERY;
|
|
204
|
+
exports.SEMANTIC_ATTRIBUTE_USER_EMAIL = semanticAttributes.SEMANTIC_ATTRIBUTE_USER_EMAIL;
|
|
205
|
+
exports.SEMANTIC_ATTRIBUTE_USER_ID = semanticAttributes.SEMANTIC_ATTRIBUTE_USER_ID;
|
|
206
|
+
exports.SEMANTIC_ATTRIBUTE_USER_IP_ADDRESS = semanticAttributes.SEMANTIC_ATTRIBUTE_USER_IP_ADDRESS;
|
|
207
|
+
exports.SEMANTIC_ATTRIBUTE_USER_USERNAME = semanticAttributes.SEMANTIC_ATTRIBUTE_USER_USERNAME;
|
|
208
|
+
exports.SEMANTIC_ATTRIBUTE_WEB_VITAL_CLS_SOURCES = semanticAttributes.SEMANTIC_ATTRIBUTE_WEB_VITAL_CLS_SOURCES;
|
|
209
|
+
exports.SEMANTIC_ATTRIBUTE_WEB_VITAL_CLS_VALUE = semanticAttributes.SEMANTIC_ATTRIBUTE_WEB_VITAL_CLS_VALUE;
|
|
210
|
+
exports.SEMANTIC_ATTRIBUTE_WEB_VITAL_FCP_VALUE = semanticAttributes.SEMANTIC_ATTRIBUTE_WEB_VITAL_FCP_VALUE;
|
|
211
|
+
exports.SEMANTIC_ATTRIBUTE_WEB_VITAL_FP_VALUE = semanticAttributes.SEMANTIC_ATTRIBUTE_WEB_VITAL_FP_VALUE;
|
|
212
|
+
exports.SEMANTIC_ATTRIBUTE_WEB_VITAL_INP_VALUE = semanticAttributes.SEMANTIC_ATTRIBUTE_WEB_VITAL_INP_VALUE;
|
|
213
|
+
exports.SEMANTIC_ATTRIBUTE_WEB_VITAL_LCP_ELEMENT = semanticAttributes.SEMANTIC_ATTRIBUTE_WEB_VITAL_LCP_ELEMENT;
|
|
214
|
+
exports.SEMANTIC_ATTRIBUTE_WEB_VITAL_LCP_ID = semanticAttributes.SEMANTIC_ATTRIBUTE_WEB_VITAL_LCP_ID;
|
|
215
|
+
exports.SEMANTIC_ATTRIBUTE_WEB_VITAL_LCP_LOAD_TIME = semanticAttributes.SEMANTIC_ATTRIBUTE_WEB_VITAL_LCP_LOAD_TIME;
|
|
216
|
+
exports.SEMANTIC_ATTRIBUTE_WEB_VITAL_LCP_RENDER_TIME = semanticAttributes.SEMANTIC_ATTRIBUTE_WEB_VITAL_LCP_RENDER_TIME;
|
|
217
|
+
exports.SEMANTIC_ATTRIBUTE_WEB_VITAL_LCP_SIZE = semanticAttributes.SEMANTIC_ATTRIBUTE_WEB_VITAL_LCP_SIZE;
|
|
218
|
+
exports.SEMANTIC_ATTRIBUTE_WEB_VITAL_LCP_URL = semanticAttributes.SEMANTIC_ATTRIBUTE_WEB_VITAL_LCP_URL;
|
|
219
|
+
exports.SEMANTIC_ATTRIBUTE_WEB_VITAL_LCP_VALUE = semanticAttributes.SEMANTIC_ATTRIBUTE_WEB_VITAL_LCP_VALUE;
|
|
220
|
+
exports.SEMANTIC_ATTRIBUTE_WEB_VITAL_TTFB_REQUEST_TIME = semanticAttributes.SEMANTIC_ATTRIBUTE_WEB_VITAL_TTFB_REQUEST_TIME;
|
|
221
|
+
exports.SEMANTIC_ATTRIBUTE_WEB_VITAL_TTFB_VALUE = semanticAttributes.SEMANTIC_ATTRIBUTE_WEB_VITAL_TTFB_VALUE;
|
|
185
222
|
exports.SEMANTIC_LINK_ATTRIBUTE_LINK_TYPE = semanticAttributes.SEMANTIC_LINK_ATTRIBUTE_LINK_TYPE;
|
|
186
|
-
exports.createEventEnvelope = envelope.createEventEnvelope;
|
|
187
|
-
exports.createSessionEnvelope = envelope.createSessionEnvelope;
|
|
188
|
-
exports.createSpanEnvelope = envelope.createSpanEnvelope;
|
|
189
|
-
exports.
|
|
190
|
-
exports.
|
|
191
|
-
exports.
|
|
192
|
-
exports.
|
|
193
|
-
exports.
|
|
194
|
-
exports.
|
|
195
|
-
exports.
|
|
196
|
-
exports.
|
|
197
|
-
exports.
|
|
198
|
-
exports.
|
|
199
|
-
exports.
|
|
200
|
-
exports.
|
|
201
|
-
exports.
|
|
202
|
-
exports.
|
|
203
|
-
exports.
|
|
204
|
-
exports.
|
|
205
|
-
exports.
|
|
206
|
-
exports.
|
|
207
|
-
exports.
|
|
208
|
-
exports.
|
|
209
|
-
exports.
|
|
223
|
+
exports.createEventEnvelope = envelope$1.createEventEnvelope;
|
|
224
|
+
exports.createSessionEnvelope = envelope$1.createSessionEnvelope;
|
|
225
|
+
exports.createSpanEnvelope = envelope$1.createSpanEnvelope;
|
|
226
|
+
exports.createSpanV2Envelope = envelope$1.createSpanV2Envelope;
|
|
227
|
+
exports.addEventProcessor = _exports.addEventProcessor;
|
|
228
|
+
exports.captureCheckIn = _exports.captureCheckIn;
|
|
229
|
+
exports.captureEvent = _exports.captureEvent;
|
|
230
|
+
exports.captureException = _exports.captureException;
|
|
231
|
+
exports.captureMessage = _exports.captureMessage;
|
|
232
|
+
exports.captureSession = _exports.captureSession;
|
|
233
|
+
exports.close = _exports.close;
|
|
234
|
+
exports.endSession = _exports.endSession;
|
|
235
|
+
exports.flush = _exports.flush;
|
|
236
|
+
exports.isEnabled = _exports.isEnabled;
|
|
237
|
+
exports.isInitialized = _exports.isInitialized;
|
|
238
|
+
exports.lastEventId = _exports.lastEventId;
|
|
239
|
+
exports.setContext = _exports.setContext;
|
|
240
|
+
exports.setConversationId = _exports.setConversationId;
|
|
241
|
+
exports.setExtra = _exports.setExtra;
|
|
242
|
+
exports.setExtras = _exports.setExtras;
|
|
243
|
+
exports.setTag = _exports.setTag;
|
|
244
|
+
exports.setTags = _exports.setTags;
|
|
245
|
+
exports.setUser = _exports.setUser;
|
|
246
|
+
exports.startSession = _exports.startSession;
|
|
247
|
+
exports.withMonitor = _exports.withMonitor;
|
|
210
248
|
exports.getClient = currentScopes.getClient;
|
|
211
249
|
exports.getCurrentScope = currentScopes.getCurrentScope;
|
|
212
250
|
exports.getGlobalScope = currentScopes.getGlobalScope;
|
|
@@ -216,7 +254,7 @@ exports.withIsolationScope = currentScopes.withIsolationScope;
|
|
|
216
254
|
exports.withScope = currentScopes.withScope;
|
|
217
255
|
exports.getDefaultCurrentScope = defaultScopes.getDefaultCurrentScope;
|
|
218
256
|
exports.getDefaultIsolationScope = defaultScopes.getDefaultIsolationScope;
|
|
219
|
-
exports.setAsyncContextStrategy = index.setAsyncContextStrategy;
|
|
257
|
+
exports.setAsyncContextStrategy = index$6.setAsyncContextStrategy;
|
|
220
258
|
exports.getGlobalSingleton = carrier.getGlobalSingleton;
|
|
221
259
|
exports.getMainCarrier = carrier.getMainCarrier;
|
|
222
260
|
exports.closeSession = session.closeSession;
|
|
@@ -241,34 +279,43 @@ exports.installedIntegrations = integration.installedIntegrations;
|
|
|
241
279
|
exports._INTERNAL_clearAiProviderSkips = providerSkip._INTERNAL_clearAiProviderSkips;
|
|
242
280
|
exports._INTERNAL_shouldSkipAiProviderWrapping = providerSkip._INTERNAL_shouldSkipAiProviderWrapping;
|
|
243
281
|
exports._INTERNAL_skipAiProviderWrapping = providerSkip._INTERNAL_skipAiProviderWrapping;
|
|
282
|
+
exports.envToBool = envToBool.envToBool;
|
|
244
283
|
exports.applyScopeDataToEvent = scopeData.applyScopeDataToEvent;
|
|
245
284
|
exports.getCombinedScopeData = scopeData.getCombinedScopeData;
|
|
246
285
|
exports.mergeScopeData = scopeData.mergeScopeData;
|
|
247
286
|
exports.prepareEvent = prepareEvent.prepareEvent;
|
|
248
287
|
exports.createCheckInEnvelope = checkin.createCheckInEnvelope;
|
|
249
288
|
exports.hasSpansEnabled = hasSpansEnabled.hasSpansEnabled;
|
|
289
|
+
exports.hasSpanStreamingEnabled = hasSpanStreamingEnabled.hasSpanStreamingEnabled;
|
|
250
290
|
exports.isSentryRequestUrl = isSentryRequestUrl.isSentryRequestUrl;
|
|
251
291
|
exports.handleCallbackErrors = handleCallbackErrors.handleCallbackErrors;
|
|
252
292
|
exports.fmt = parameterize.fmt;
|
|
253
293
|
exports.parameterize = parameterize.parameterize;
|
|
254
294
|
exports.addAutoIpAddressToSession = ipAddress.addAutoIpAddressToSession;
|
|
255
295
|
exports.addAutoIpAddressToUser = ipAddress.addAutoIpAddressToUser;
|
|
296
|
+
exports.INTERNAL_getSegmentSpan = spanUtils.INTERNAL_getSegmentSpan;
|
|
256
297
|
exports.addChildSpanToSpan = spanUtils.addChildSpanToSpan;
|
|
257
298
|
exports.convertSpanLinksForEnvelope = spanUtils.convertSpanLinksForEnvelope;
|
|
258
299
|
exports.getActiveSpan = spanUtils.getActiveSpan;
|
|
259
300
|
exports.getRootSpan = spanUtils.getRootSpan;
|
|
260
301
|
exports.getSpanDescendants = spanUtils.getSpanDescendants;
|
|
261
302
|
exports.getStatusMessage = spanUtils.getStatusMessage;
|
|
303
|
+
exports.showSpanDropWarning = spanUtils.showSpanDropWarning;
|
|
262
304
|
exports.spanIsSampled = spanUtils.spanIsSampled;
|
|
263
305
|
exports.spanTimeInputToSeconds = spanUtils.spanTimeInputToSeconds;
|
|
264
306
|
exports.spanToJSON = spanUtils.spanToJSON;
|
|
265
307
|
exports.spanToTraceContext = spanUtils.spanToTraceContext;
|
|
266
308
|
exports.spanToTraceHeader = spanUtils.spanToTraceHeader;
|
|
309
|
+
exports.spanToV2JSON = spanUtils.spanToV2JSON;
|
|
267
310
|
exports.updateSpanName = spanUtils.updateSpanName;
|
|
311
|
+
exports.captureSpan = captureSpan.captureSpan;
|
|
312
|
+
exports.safeSetSpanJSONAttributes = spanFirstUtils.safeSetSpanJSONAttributes;
|
|
313
|
+
exports.SpanBuffer = spanBuffer.SpanBuffer;
|
|
268
314
|
exports._INTERNAL_setSpanForScope = spanOnScope._setSpanForScope;
|
|
269
315
|
exports.parseSampleRate = parseSampleRate.parseSampleRate;
|
|
270
316
|
exports.applySdkMetadata = sdkMetadata.applySdkMetadata;
|
|
271
317
|
exports.getTraceData = traceData.getTraceData;
|
|
318
|
+
exports.shouldPropagateTraceForUrl = tracePropagationTargets.shouldPropagateTraceForUrl;
|
|
272
319
|
exports.getTraceMetaTags = meta.getTraceMetaTags;
|
|
273
320
|
exports.debounce = debounce.debounce;
|
|
274
321
|
exports.extractQueryParamsFromUrl = request.extractQueryParamsFromUrl;
|
|
@@ -277,8 +324,8 @@ exports.httpHeadersToSpanAttributes = request.httpHeadersToSpanAttributes;
|
|
|
277
324
|
exports.httpRequestToRequestData = request.httpRequestToRequestData;
|
|
278
325
|
exports.winterCGHeadersToDict = request.winterCGHeadersToDict;
|
|
279
326
|
exports.winterCGRequestToRequestData = request.winterCGRequestToRequestData;
|
|
280
|
-
exports.DEFAULT_ENVIRONMENT = constants.DEFAULT_ENVIRONMENT;
|
|
281
|
-
exports.DEV_ENVIRONMENT = constants.DEV_ENVIRONMENT;
|
|
327
|
+
exports.DEFAULT_ENVIRONMENT = constants$1.DEFAULT_ENVIRONMENT;
|
|
328
|
+
exports.DEV_ENVIRONMENT = constants$1.DEV_ENVIRONMENT;
|
|
282
329
|
exports.addBreadcrumb = breadcrumbs.addBreadcrumb;
|
|
283
330
|
exports.functionToStringIntegration = functiontostring.functionToStringIntegration;
|
|
284
331
|
exports.eventFiltersIntegration = eventFilters.eventFiltersIntegration;
|
|
@@ -294,14 +341,15 @@ exports.instrumentSupabaseClient = supabase.instrumentSupabaseClient;
|
|
|
294
341
|
exports.supabaseIntegration = supabase.supabaseIntegration;
|
|
295
342
|
exports.zodErrorsIntegration = zoderrors.zodErrorsIntegration;
|
|
296
343
|
exports.thirdPartyErrorFilterIntegration = thirdPartyErrorsFilter.thirdPartyErrorFilterIntegration;
|
|
297
|
-
exports.consoleIntegration = console.consoleIntegration;
|
|
344
|
+
exports.consoleIntegration = console$1.consoleIntegration;
|
|
298
345
|
exports.featureFlagsIntegration = featureFlagsIntegration.featureFlagsIntegration;
|
|
299
346
|
exports.growthbookIntegration = growthbook.growthbookIntegration;
|
|
300
347
|
exports.conversationIdIntegration = conversationId.conversationIdIntegration;
|
|
348
|
+
exports.spanStreamingIntegration = spanStreaming.spanStreamingIntegration;
|
|
301
349
|
exports.profiler = profiling.profiler;
|
|
302
|
-
exports.instrumentFetchRequest = fetch.instrumentFetchRequest;
|
|
350
|
+
exports.instrumentFetchRequest = fetch$1.instrumentFetchRequest;
|
|
303
351
|
exports.trpcMiddleware = trpc.trpcMiddleware;
|
|
304
|
-
exports.wrapMcpServerWithSentry = index$
|
|
352
|
+
exports.wrapMcpServerWithSentry = index$7.wrapMcpServerWithSentry;
|
|
305
353
|
exports.captureFeedback = feedback.captureFeedback;
|
|
306
354
|
exports._INTERNAL_captureLog = internal._INTERNAL_captureLog;
|
|
307
355
|
exports._INTERNAL_captureSerializedLog = internal._INTERNAL_captureSerializedLog;
|
|
@@ -313,20 +361,20 @@ exports._INTERNAL_captureSerializedMetric = internal$1._INTERNAL_captureSerializ
|
|
|
313
361
|
exports._INTERNAL_flushMetricsBuffer = internal$1._INTERNAL_flushMetricsBuffer;
|
|
314
362
|
exports.metrics = publicApi$1;
|
|
315
363
|
exports.createConsolaReporter = consola.createConsolaReporter;
|
|
316
|
-
exports.addVercelAiProcessors = index
|
|
364
|
+
exports.addVercelAiProcessors = index.addVercelAiProcessors;
|
|
317
365
|
exports._INTERNAL_cleanupToolCallSpan = utils._INTERNAL_cleanupToolCallSpan;
|
|
318
366
|
exports._INTERNAL_getSpanForToolCallId = utils._INTERNAL_getSpanForToolCallId;
|
|
319
|
-
exports.instrumentOpenAiClient = index$
|
|
320
|
-
exports.OPENAI_INTEGRATION_NAME = constants$
|
|
321
|
-
exports.instrumentAnthropicAiClient = index$
|
|
322
|
-
exports.ANTHROPIC_AI_INTEGRATION_NAME = constants
|
|
323
|
-
exports.instrumentGoogleGenAIClient = index$
|
|
324
|
-
exports.GOOGLE_GENAI_INTEGRATION_NAME = constants$
|
|
325
|
-
exports.createLangChainCallbackHandler = index$
|
|
326
|
-
exports.LANGCHAIN_INTEGRATION_NAME = constants$
|
|
327
|
-
exports.instrumentLangGraph = index$
|
|
328
|
-
exports.instrumentStateGraphCompile = index$
|
|
329
|
-
exports.LANGGRAPH_INTEGRATION_NAME = constants$
|
|
367
|
+
exports.instrumentOpenAiClient = index$5.instrumentOpenAiClient;
|
|
368
|
+
exports.OPENAI_INTEGRATION_NAME = constants$5.OPENAI_INTEGRATION_NAME;
|
|
369
|
+
exports.instrumentAnthropicAiClient = index$2.instrumentAnthropicAiClient;
|
|
370
|
+
exports.ANTHROPIC_AI_INTEGRATION_NAME = constants.ANTHROPIC_AI_INTEGRATION_NAME;
|
|
371
|
+
exports.instrumentGoogleGenAIClient = index$3.instrumentGoogleGenAIClient;
|
|
372
|
+
exports.GOOGLE_GENAI_INTEGRATION_NAME = constants$2.GOOGLE_GENAI_INTEGRATION_NAME;
|
|
373
|
+
exports.createLangChainCallbackHandler = index$1.createLangChainCallbackHandler;
|
|
374
|
+
exports.LANGCHAIN_INTEGRATION_NAME = constants$3.LANGCHAIN_INTEGRATION_NAME;
|
|
375
|
+
exports.instrumentLangGraph = index$4.instrumentLangGraph;
|
|
376
|
+
exports.instrumentStateGraphCompile = index$4.instrumentStateGraphCompile;
|
|
377
|
+
exports.LANGGRAPH_INTEGRATION_NAME = constants$4.LANGGRAPH_INTEGRATION_NAME;
|
|
330
378
|
exports._INTERNAL_FLAG_BUFFER_SIZE = featureFlags._INTERNAL_FLAG_BUFFER_SIZE;
|
|
331
379
|
exports._INTERNAL_MAX_FLAGS_PER_SPAN = featureFlags._INTERNAL_MAX_FLAGS_PER_SPAN;
|
|
332
380
|
exports._INTERNAL_addFeatureFlagToActiveSpan = featureFlags._INTERNAL_addFeatureFlagToActiveSpan;
|
|
@@ -342,9 +390,9 @@ exports.dsnToString = dsn.dsnToString;
|
|
|
342
390
|
exports.makeDsn = dsn.makeDsn;
|
|
343
391
|
exports.SentryError = error.SentryError;
|
|
344
392
|
exports.GLOBAL_OBJ = worldwide.GLOBAL_OBJ;
|
|
345
|
-
exports.addConsoleInstrumentationHandler = console
|
|
346
|
-
exports.addFetchEndInstrumentationHandler = fetch
|
|
347
|
-
exports.addFetchInstrumentationHandler = fetch
|
|
393
|
+
exports.addConsoleInstrumentationHandler = console.addConsoleInstrumentationHandler;
|
|
394
|
+
exports.addFetchEndInstrumentationHandler = fetch.addFetchEndInstrumentationHandler;
|
|
395
|
+
exports.addFetchInstrumentationHandler = fetch.addFetchInstrumentationHandler;
|
|
348
396
|
exports.addGlobalErrorInstrumentationHandler = globalError.addGlobalErrorInstrumentationHandler;
|
|
349
397
|
exports.addGlobalUnhandledRejectionInstrumentationHandler = globalUnhandledRejection.addGlobalUnhandledRejectionInstrumentationHandler;
|
|
350
398
|
exports.addHandler = handlers.addHandler;
|
|
@@ -401,7 +449,7 @@ exports.resolve = path.resolve;
|
|
|
401
449
|
exports.SENTRY_BUFFER_FULL_ERROR = promisebuffer.SENTRY_BUFFER_FULL_ERROR;
|
|
402
450
|
exports.makePromiseBuffer = promisebuffer.makePromiseBuffer;
|
|
403
451
|
exports.severityLevelFromString = severity.severityLevelFromString;
|
|
404
|
-
exports.replaceExports =
|
|
452
|
+
exports.replaceExports = _exports$1.replaceExports;
|
|
405
453
|
exports.UNKNOWN_FUNCTION = stacktrace.UNKNOWN_FUNCTION;
|
|
406
454
|
exports.createStackParser = stacktrace.createStackParser;
|
|
407
455
|
exports.getFramesFromEvent = stacktrace.getFramesFromEvent;
|
|
@@ -439,17 +487,17 @@ exports.propagationContextFromHeaders = tracing.propagationContextFromHeaders;
|
|
|
439
487
|
exports.shouldContinueTrace = tracing.shouldContinueTrace;
|
|
440
488
|
exports.getSDKSource = env.getSDKSource;
|
|
441
489
|
exports.isBrowserBundle = env.isBrowserBundle;
|
|
442
|
-
exports.addItemToEnvelope = envelope
|
|
443
|
-
exports.createAttachmentEnvelopeItem = envelope
|
|
444
|
-
exports.createEnvelope = envelope
|
|
445
|
-
exports.createEventEnvelopeHeaders = envelope
|
|
446
|
-
exports.createSpanEnvelopeItem = envelope
|
|
447
|
-
exports.envelopeContainsItemType = envelope
|
|
448
|
-
exports.envelopeItemTypeToDataCategory = envelope
|
|
449
|
-
exports.forEachEnvelopeItem = envelope
|
|
450
|
-
exports.getSdkMetadataForEnvelopeHeader = envelope
|
|
451
|
-
exports.parseEnvelope = envelope
|
|
452
|
-
exports.serializeEnvelope = envelope
|
|
490
|
+
exports.addItemToEnvelope = envelope.addItemToEnvelope;
|
|
491
|
+
exports.createAttachmentEnvelopeItem = envelope.createAttachmentEnvelopeItem;
|
|
492
|
+
exports.createEnvelope = envelope.createEnvelope;
|
|
493
|
+
exports.createEventEnvelopeHeaders = envelope.createEventEnvelopeHeaders;
|
|
494
|
+
exports.createSpanEnvelopeItem = envelope.createSpanEnvelopeItem;
|
|
495
|
+
exports.envelopeContainsItemType = envelope.envelopeContainsItemType;
|
|
496
|
+
exports.envelopeItemTypeToDataCategory = envelope.envelopeItemTypeToDataCategory;
|
|
497
|
+
exports.forEachEnvelopeItem = envelope.forEachEnvelopeItem;
|
|
498
|
+
exports.getSdkMetadataForEnvelopeHeader = envelope.getSdkMetadataForEnvelopeHeader;
|
|
499
|
+
exports.parseEnvelope = envelope.parseEnvelope;
|
|
500
|
+
exports.serializeEnvelope = envelope.serializeEnvelope;
|
|
453
501
|
exports.createClientReportEnvelope = clientreport.createClientReportEnvelope;
|
|
454
502
|
exports.DEFAULT_RETRY_AFTER = ratelimit.DEFAULT_RETRY_AFTER;
|
|
455
503
|
exports.disabledUntil = ratelimit.disabledUntil;
|
|
@@ -488,6 +536,10 @@ exports.getDebugImagesForResources = debugIds.getDebugImagesForResources;
|
|
|
488
536
|
exports.getFilenameToDebugIdMap = debugIds.getFilenameToDebugIdMap;
|
|
489
537
|
exports.getFilenameToMetadataMap = metadata.getFilenameToMetadataMap;
|
|
490
538
|
exports.escapeStringForRegex = escapeStringForRegex.escapeStringForRegex;
|
|
539
|
+
exports.isV2BeforeSendSpanCallback = beforeSendSpan.isV2BeforeSendSpanCallback;
|
|
540
|
+
exports.withStreamSpan = beforeSendSpan.withStreamSpan;
|
|
541
|
+
exports.reparentChildSpans = shouldIgnoreSpan.reparentChildSpans;
|
|
542
|
+
exports.shouldIgnoreSpan = shouldIgnoreSpan.shouldIgnoreSpan;
|
|
491
543
|
exports._INTERNAL_safeDateNow = randomSafeContext.safeDateNow;
|
|
492
544
|
exports._INTERNAL_safeMathRandom = randomSafeContext.safeMathRandom;
|
|
493
545
|
exports._INTERNAL_withRandomSafeContext = randomSafeContext.withRandomSafeContext;
|
package/build/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/build/cjs/integration.js
CHANGED
|
@@ -79,6 +79,17 @@ function setupIntegrations(client, integrations) {
|
|
|
79
79
|
return integrationIndex;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
+
/**
|
|
83
|
+
* Runs the `beforeSetup` hooks of the given integrations on the given client.
|
|
84
|
+
*/
|
|
85
|
+
function beforeSetupIntegrations(client, integrations) {
|
|
86
|
+
for (const integration of integrations) {
|
|
87
|
+
if (integration?.beforeSetup) {
|
|
88
|
+
integration.beforeSetup(client);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
82
93
|
/**
|
|
83
94
|
* Execute the `afterAllSetup` hooks of the given integrations.
|
|
84
95
|
*/
|
|
@@ -150,6 +161,7 @@ function defineIntegration(fn) {
|
|
|
150
161
|
|
|
151
162
|
exports.addIntegration = addIntegration;
|
|
152
163
|
exports.afterSetupIntegrations = afterSetupIntegrations;
|
|
164
|
+
exports.beforeSetupIntegrations = beforeSetupIntegrations;
|
|
153
165
|
exports.defineIntegration = defineIntegration;
|
|
154
166
|
exports.getIntegrationsToSetup = getIntegrationsToSetup;
|
|
155
167
|
exports.installedIntegrations = installedIntegrations;
|