@sentry/core 10.53.1 → 10.54.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/api.js +10 -34
- package/build/cjs/api.js.map +1 -1
- package/build/cjs/asyncContext/index.js +0 -14
- package/build/cjs/asyncContext/index.js.map +1 -1
- package/build/cjs/asyncContext/stackStrategy.js +16 -47
- package/build/cjs/asyncContext/stackStrategy.js.map +1 -1
- package/build/cjs/attributes.js +17 -95
- package/build/cjs/attributes.js.map +1 -1
- package/build/cjs/breadcrumbs.js +2 -22
- package/build/cjs/breadcrumbs.js.map +1 -1
- package/build/cjs/browser.js +12 -3
- package/build/cjs/browser.js.map +1 -1
- package/build/cjs/carrier.js +5 -42
- package/build/cjs/carrier.js.map +1 -1
- package/build/cjs/checkin.js +5 -19
- package/build/cjs/checkin.js.map +1 -1
- package/build/cjs/client.js +216 -585
- package/build/cjs/client.js.map +1 -1
- package/build/cjs/constants.js +2 -2
- package/build/cjs/currentScopes.js +5 -86
- package/build/cjs/currentScopes.js.map +1 -1
- package/build/cjs/debug-build.js +0 -5
- package/build/cjs/debug-build.js.map +1 -1
- package/build/cjs/defaultScopes.js +2 -5
- package/build/cjs/defaultScopes.js.map +1 -1
- package/build/cjs/envelope.js +32 -103
- package/build/cjs/envelope.js.map +1 -1
- package/build/cjs/eventProcessors.js +4 -23
- package/build/cjs/eventProcessors.js.map +1 -1
- package/build/cjs/exports.js +21 -197
- package/build/cjs/exports.js.map +1 -1
- package/build/cjs/feedback.js +7 -19
- package/build/cjs/feedback.js.map +1 -1
- package/build/cjs/fetch.js +66 -201
- package/build/cjs/fetch.js.map +1 -1
- package/build/cjs/index.js +17 -3
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/instrument/console.js +9 -41
- package/build/cjs/instrument/console.js.map +1 -1
- package/build/cjs/instrument/fetch.js +47 -156
- package/build/cjs/instrument/fetch.js.map +1 -1
- package/build/cjs/instrument/globalError.js +4 -25
- package/build/cjs/instrument/globalError.js.map +1 -1
- package/build/cjs/instrument/globalUnhandledRejection.js +4 -21
- package/build/cjs/instrument/globalUnhandledRejection.js.map +1 -1
- package/build/cjs/instrument/handlers.js +9 -21
- package/build/cjs/instrument/handlers.js.map +1 -1
- package/build/cjs/integration.js +13 -77
- package/build/cjs/integration.js.map +1 -1
- package/build/cjs/integrations/captureconsole.js +16 -40
- package/build/cjs/integrations/captureconsole.js.map +1 -1
- package/build/cjs/integrations/consola.js +57 -163
- package/build/cjs/integrations/consola.js.map +1 -1
- package/build/cjs/integrations/console.js +11 -43
- package/build/cjs/integrations/console.js.map +1 -1
- package/build/cjs/integrations/conversationId.js +5 -22
- package/build/cjs/integrations/conversationId.js.map +1 -1
- package/build/cjs/integrations/dedupe.js +16 -74
- package/build/cjs/integrations/dedupe.js.map +1 -1
- package/build/cjs/integrations/eventFilters.js +63 -114
- package/build/cjs/integrations/eventFilters.js.map +1 -1
- package/build/cjs/integrations/express/index.js +30 -145
- package/build/cjs/integrations/express/index.js.map +1 -1
- package/build/cjs/integrations/express/patch-layer.js +20 -130
- package/build/cjs/integrations/express/patch-layer.js.map +1 -1
- package/build/cjs/integrations/express/request-layer-store.js +1 -3
- package/build/cjs/integrations/express/request-layer-store.js.map +1 -1
- package/build/cjs/integrations/express/set-sdk-processing-metadata.js +0 -2
- package/build/cjs/integrations/express/set-sdk-processing-metadata.js.map +1 -1
- package/build/cjs/integrations/express/types.js +6 -7
- package/build/cjs/integrations/express/types.js.map +1 -1
- package/build/cjs/integrations/express/utils.js +37 -145
- package/build/cjs/integrations/express/utils.js.map +1 -1
- package/build/cjs/integrations/extraerrordata.js +24 -69
- package/build/cjs/integrations/extraerrordata.js.map +1 -1
- package/build/cjs/integrations/featureFlags/featureFlagsIntegration.js +3 -29
- package/build/cjs/integrations/featureFlags/featureFlagsIntegration.js.map +1 -1
- package/build/cjs/integrations/featureFlags/growthbook.js +11 -40
- package/build/cjs/integrations/featureFlags/growthbook.js.map +1 -1
- package/build/cjs/integrations/functiontostring.js +6 -27
- package/build/cjs/integrations/functiontostring.js.map +1 -1
- package/build/cjs/integrations/http/add-outgoing-request-breadcrumb.js +10 -18
- package/build/cjs/integrations/http/add-outgoing-request-breadcrumb.js.map +1 -1
- package/build/cjs/integrations/http/client-patch.js +8 -70
- package/build/cjs/integrations/http/client-patch.js.map +1 -1
- package/build/cjs/integrations/http/client-subscriptions.js +22 -59
- package/build/cjs/integrations/http/client-subscriptions.js.map +1 -1
- package/build/cjs/integrations/http/constants.js +3 -3
- package/build/cjs/integrations/http/double-wrap-warning.js +10 -18
- package/build/cjs/integrations/http/double-wrap-warning.js.map +1 -1
- package/build/cjs/integrations/http/get-outgoing-span-data.js +30 -47
- package/build/cjs/integrations/http/get-outgoing-span-data.js.map +1 -1
- package/build/cjs/integrations/http/get-request-url.js +7 -24
- package/build/cjs/integrations/http/get-request-url.js.map +1 -1
- package/build/cjs/integrations/http/inject-trace-propagation-headers.js +14 -38
- package/build/cjs/integrations/http/inject-trace-propagation-headers.js.map +1 -1
- package/build/cjs/integrations/http/patch-request-to-capture-body.js +80 -0
- package/build/cjs/integrations/http/patch-request-to-capture-body.js.map +1 -0
- package/build/cjs/integrations/http/record-request-session.js +61 -0
- package/build/cjs/integrations/http/record-request-session.js.map +1 -0
- package/build/cjs/integrations/http/server-subscription.js +289 -0
- package/build/cjs/integrations/http/server-subscription.js.map +1 -0
- package/build/cjs/integrations/linkederrors.js +6 -11
- package/build/cjs/integrations/linkederrors.js.map +1 -1
- package/build/cjs/integrations/mcp-server/attributeExtraction.js +26 -69
- package/build/cjs/integrations/mcp-server/attributeExtraction.js.map +1 -1
- package/build/cjs/integrations/mcp-server/attributes.js +30 -138
- package/build/cjs/integrations/mcp-server/attributes.js.map +1 -1
- package/build/cjs/integrations/mcp-server/correlation.js +20 -91
- package/build/cjs/integrations/mcp-server/correlation.js.map +1 -1
- package/build/cjs/integrations/mcp-server/errorCapture.js +6 -25
- package/build/cjs/integrations/mcp-server/errorCapture.js.map +1 -1
- package/build/cjs/integrations/mcp-server/handlers.js +55 -169
- package/build/cjs/integrations/mcp-server/handlers.js.map +1 -1
- package/build/cjs/integrations/mcp-server/index.js +7 -60
- package/build/cjs/integrations/mcp-server/index.js.map +1 -1
- package/build/cjs/integrations/mcp-server/methodConfig.js +21 -59
- package/build/cjs/integrations/mcp-server/methodConfig.js.map +1 -1
- package/build/cjs/integrations/mcp-server/piiFiltering.js +5 -33
- package/build/cjs/integrations/mcp-server/piiFiltering.js.map +1 -1
- package/build/cjs/integrations/mcp-server/resultExtraction.js +20 -76
- package/build/cjs/integrations/mcp-server/resultExtraction.js.map +1 -1
- package/build/cjs/integrations/mcp-server/sessionExtraction.js +30 -121
- package/build/cjs/integrations/mcp-server/sessionExtraction.js.map +1 -1
- package/build/cjs/integrations/mcp-server/sessionManagement.js +2 -60
- package/build/cjs/integrations/mcp-server/sessionManagement.js.map +1 -1
- package/build/cjs/integrations/mcp-server/spans.js +20 -107
- package/build/cjs/integrations/mcp-server/spans.js.map +1 -1
- package/build/cjs/integrations/mcp-server/transport.js +26 -94
- package/build/cjs/integrations/mcp-server/transport.js.map +1 -1
- package/build/cjs/integrations/mcp-server/validation.js +6 -72
- package/build/cjs/integrations/mcp-server/validation.js.map +1 -1
- package/build/cjs/integrations/moduleMetadata.js +6 -20
- package/build/cjs/integrations/moduleMetadata.js.map +1 -1
- package/build/cjs/integrations/postgresjs.js +78 -287
- package/build/cjs/integrations/postgresjs.js.map +1 -1
- package/build/cjs/integrations/requestdata.js +30 -93
- package/build/cjs/integrations/requestdata.js.map +1 -1
- package/build/cjs/integrations/rewriteframes.js +14 -45
- package/build/cjs/integrations/rewriteframes.js.map +1 -1
- package/build/cjs/integrations/spanStreaming.js +9 -15
- package/build/cjs/integrations/spanStreaming.js.map +1 -1
- package/build/cjs/integrations/supabase.js +224 -333
- package/build/cjs/integrations/supabase.js.map +1 -1
- package/build/cjs/integrations/third-party-errors-filter.js +60 -85
- package/build/cjs/integrations/third-party-errors-filter.js.map +1 -1
- package/build/cjs/integrations/zoderrors.js +35 -111
- package/build/cjs/integrations/zoderrors.js.map +1 -1
- package/build/cjs/logs/console-integration.js +15 -50
- package/build/cjs/logs/console-integration.js.map +1 -1
- package/build/cjs/logs/constants.js +1 -6
- package/build/cjs/logs/constants.js.map +1 -1
- package/build/cjs/logs/envelope.js +10 -40
- package/build/cjs/logs/envelope.js.map +1 -1
- package/build/cjs/logs/internal.js +53 -125
- package/build/cjs/logs/internal.js.map +1 -1
- package/build/cjs/logs/public-api.js +13 -228
- package/build/cjs/logs/public-api.js.map +1 -1
- package/build/cjs/logs/utils.js +6 -47
- package/build/cjs/logs/utils.js.map +1 -1
- package/build/cjs/metadata.js +6 -51
- package/build/cjs/metadata.js.map +1 -1
- package/build/cjs/metrics/envelope.js +12 -45
- package/build/cjs/metrics/envelope.js.map +1 -1
- package/build/cjs/metrics/internal.js +31 -144
- package/build/cjs/metrics/internal.js.map +1 -1
- package/build/cjs/metrics/public-api.js +4 -109
- package/build/cjs/metrics/public-api.js.map +1 -1
- package/build/cjs/profiling.js +11 -41
- package/build/cjs/profiling.js.map +1 -1
- package/build/cjs/scope.js +73 -224
- package/build/cjs/scope.js.map +1 -1
- package/build/cjs/sdk.js +2 -21
- package/build/cjs/sdk.js.map +1 -1
- package/build/cjs/semanticAttributes.js +30 -116
- package/build/cjs/semanticAttributes.js.map +1 -1
- package/build/cjs/server-runtime-client.js +32 -87
- package/build/cjs/server-runtime-client.js.map +1 -1
- package/build/cjs/server.js +17 -3
- package/build/cjs/server.js.map +1 -1
- package/build/cjs/session.js +14 -67
- package/build/cjs/session.js.map +1 -1
- package/build/cjs/tracing/ai/gen-ai-attributes.js +45 -249
- package/build/cjs/tracing/ai/gen-ai-attributes.js.map +1 -1
- package/build/cjs/tracing/ai/mediaStripping.js +21 -116
- package/build/cjs/tracing/ai/mediaStripping.js.map +1 -1
- package/build/cjs/tracing/ai/messageTruncation.js +26 -212
- package/build/cjs/tracing/ai/messageTruncation.js.map +1 -1
- package/build/cjs/tracing/ai/utils.js +40 -180
- package/build/cjs/tracing/ai/utils.js.map +1 -1
- package/build/cjs/tracing/anthropic-ai/constants.js +9 -12
- package/build/cjs/tracing/anthropic-ai/constants.js.map +1 -1
- package/build/cjs/tracing/anthropic-ai/index.js +67 -172
- package/build/cjs/tracing/anthropic-ai/index.js.map +1 -1
- package/build/cjs/tracing/anthropic-ai/streaming.js +45 -149
- package/build/cjs/tracing/anthropic-ai/streaming.js.map +1 -1
- package/build/cjs/tracing/anthropic-ai/utils.js +17 -47
- package/build/cjs/tracing/anthropic-ai/utils.js.map +1 -1
- package/build/cjs/tracing/dynamicSamplingContext.js +18 -85
- package/build/cjs/tracing/dynamicSamplingContext.js.map +1 -1
- package/build/cjs/tracing/errors.js +2 -14
- package/build/cjs/tracing/errors.js.map +1 -1
- package/build/cjs/tracing/google-genai/constants.js +9 -16
- package/build/cjs/tracing/google-genai/constants.js.map +1 -1
- package/build/cjs/tracing/google-genai/index.js +79 -223
- package/build/cjs/tracing/google-genai/index.js.map +1 -1
- package/build/cjs/tracing/google-genai/streaming.js +11 -56
- package/build/cjs/tracing/google-genai/streaming.js.map +1 -1
- package/build/cjs/tracing/google-genai/utils.js +8 -13
- package/build/cjs/tracing/google-genai/utils.js.map +1 -1
- package/build/cjs/tracing/idleSpan.js +48 -174
- package/build/cjs/tracing/idleSpan.js.map +1 -1
- package/build/cjs/tracing/langchain/constants.js +8 -9
- package/build/cjs/tracing/langchain/constants.js.map +1 -1
- package/build/cjs/tracing/langchain/embeddings.js +31 -75
- package/build/cjs/tracing/langchain/embeddings.js.map +1 -1
- package/build/cjs/tracing/langchain/index.js +64 -161
- package/build/cjs/tracing/langchain/index.js.map +1 -1
- package/build/cjs/tracing/langchain/utils.js +101 -311
- package/build/cjs/tracing/langchain/utils.js.map +1 -1
- package/build/cjs/tracing/langgraph/constants.js +2 -2
- package/build/cjs/tracing/langgraph/index.js +57 -160
- package/build/cjs/tracing/langgraph/index.js.map +1 -1
- package/build/cjs/tracing/langgraph/utils.js +53 -170
- package/build/cjs/tracing/langgraph/utils.js.map +1 -1
- package/build/cjs/tracing/logSpans.js +10 -26
- package/build/cjs/tracing/logSpans.js.map +1 -1
- package/build/cjs/tracing/measurement.js +6 -18
- package/build/cjs/tracing/measurement.js.map +1 -1
- package/build/cjs/tracing/openai/constants.js +20 -24
- package/build/cjs/tracing/openai/constants.js.map +1 -1
- package/build/cjs/tracing/openai/index.js +52 -132
- package/build/cjs/tracing/openai/index.js.map +1 -1
- package/build/cjs/tracing/openai/streaming.js +24 -102
- package/build/cjs/tracing/openai/streaming.js.map +1 -1
- package/build/cjs/tracing/openai/utils.js +36 -107
- package/build/cjs/tracing/openai/utils.js.map +1 -1
- package/build/cjs/tracing/sampling.js +23 -63
- package/build/cjs/tracing/sampling.js.map +1 -1
- package/build/cjs/tracing/sentryNonRecordingSpan.js +15 -40
- package/build/cjs/tracing/sentryNonRecordingSpan.js.map +1 -1
- package/build/cjs/tracing/sentrySpan.js +66 -172
- package/build/cjs/tracing/sentrySpan.js.map +1 -1
- package/build/cjs/tracing/spans/beforeSendSpan.js +4 -32
- package/build/cjs/tracing/spans/beforeSendSpan.js.map +1 -1
- package/build/cjs/tracing/spans/captureSpan.js +58 -156
- package/build/cjs/tracing/spans/captureSpan.js.map +1 -1
- package/build/cjs/tracing/spans/envelope.js +12 -24
- package/build/cjs/tracing/spans/envelope.js.map +1 -1
- package/build/cjs/tracing/spans/estimateSize.js +0 -22
- package/build/cjs/tracing/spans/estimateSize.js.map +1 -1
- package/build/cjs/tracing/spans/extractGenAiSpans.js +11 -33
- package/build/cjs/tracing/spans/extractGenAiSpans.js.map +1 -1
- package/build/cjs/tracing/spans/hasSpanStreamingEnabled.js +1 -4
- package/build/cjs/tracing/spans/hasSpanStreamingEnabled.js.map +1 -1
- package/build/cjs/tracing/spans/scopeContextAttributes.js +58 -0
- package/build/cjs/tracing/spans/scopeContextAttributes.js.map +1 -0
- package/build/cjs/tracing/spans/spanBuffer.js +21 -71
- package/build/cjs/tracing/spans/spanBuffer.js.map +1 -1
- package/build/cjs/tracing/spans/spanJsonToStreamedSpan.js +4 -8
- package/build/cjs/tracing/spans/spanJsonToStreamedSpan.js.map +1 -1
- package/build/cjs/tracing/spanstatus.js +15 -32
- package/build/cjs/tracing/spanstatus.js.map +1 -1
- package/build/cjs/tracing/trace.js +95 -311
- package/build/cjs/tracing/trace.js.map +1 -1
- package/build/cjs/tracing/utils.js +4 -14
- package/build/cjs/tracing/utils.js.map +1 -1
- package/build/cjs/tracing/vercel-ai/constants.js +15 -26
- package/build/cjs/tracing/vercel-ai/constants.js.map +1 -1
- package/build/cjs/tracing/vercel-ai/index.js +84 -288
- package/build/cjs/tracing/vercel-ai/index.js.map +1 -1
- package/build/cjs/tracing/vercel-ai/utils.js +30 -128
- package/build/cjs/tracing/vercel-ai/utils.js.map +1 -1
- package/build/cjs/tracing/vercel-ai/vercel-ai-attributes.js +22 -229
- package/build/cjs/tracing/vercel-ai/vercel-ai-attributes.js.map +1 -1
- package/build/cjs/transports/base.js +32 -67
- package/build/cjs/transports/base.js.map +1 -1
- package/build/cjs/transports/multiplexed.js +38 -103
- package/build/cjs/transports/multiplexed.js.map +1 -1
- package/build/cjs/transports/offline.js +31 -72
- package/build/cjs/transports/offline.js.map +1 -1
- package/build/cjs/transports/userAgent.js +4 -13
- package/build/cjs/transports/userAgent.js.map +1 -1
- package/build/cjs/trpc.js +19 -39
- package/build/cjs/trpc.js.map +1 -1
- package/build/cjs/utils/aggregate-errors.js +18 -62
- package/build/cjs/utils/aggregate-errors.js.map +1 -1
- package/build/cjs/utils/ai/providerSkip.js +3 -50
- package/build/cjs/utils/ai/providerSkip.js.map +1 -1
- package/build/cjs/utils/anr.js +7 -36
- package/build/cjs/utils/anr.js.map +1 -1
- package/build/cjs/utils/baggage.js +37 -146
- package/build/cjs/utils/baggage.js.map +1 -1
- package/build/cjs/utils/breadcrumb-log-level.js +5 -9
- package/build/cjs/utils/breadcrumb-log-level.js.map +1 -1
- package/build/cjs/utils/browser.js +24 -86
- package/build/cjs/utils/browser.js.map +1 -1
- package/build/cjs/utils/chain-and-copy-promiselike.js +10 -27
- package/build/cjs/utils/chain-and-copy-promiselike.js.map +1 -1
- package/build/cjs/utils/clientreport.js +4 -13
- package/build/cjs/utils/clientreport.js.map +1 -1
- package/build/cjs/utils/cookie.js +6 -53
- package/build/cjs/utils/cookie.js.map +1 -1
- package/build/cjs/utils/data-collection/defaultPiiToCollectionOptions.js +28 -0
- package/build/cjs/utils/data-collection/defaultPiiToCollectionOptions.js.map +1 -0
- package/build/cjs/utils/data-collection/filterCookies.js +23 -0
- package/build/cjs/utils/data-collection/filterCookies.js.map +1 -0
- package/build/cjs/utils/data-collection/filterKeyValueData.js +43 -0
- package/build/cjs/utils/data-collection/filterKeyValueData.js.map +1 -0
- package/build/cjs/utils/data-collection/filterQueryParams.js +26 -0
- package/build/cjs/utils/data-collection/filterQueryParams.js.map +1 -0
- package/build/cjs/utils/data-collection/filtering-snippets.js +61 -0
- package/build/cjs/utils/data-collection/filtering-snippets.js.map +1 -0
- package/build/cjs/utils/data-collection/resolveDataCollectionOptions.js +37 -0
- package/build/cjs/utils/data-collection/resolveDataCollectionOptions.js.map +1 -0
- package/build/cjs/utils/debounce.js +5 -32
- package/build/cjs/utils/debounce.js.map +1 -1
- package/build/cjs/utils/debug-ids.js +4 -42
- package/build/cjs/utils/debug-ids.js.map +1 -1
- package/build/cjs/utils/debug-logger.js +23 -56
- package/build/cjs/utils/debug-logger.js.map +1 -1
- package/build/cjs/utils/dsn.js +18 -81
- package/build/cjs/utils/dsn.js.map +1 -1
- package/build/cjs/utils/env.js +3 -27
- package/build/cjs/utils/env.js.map +1 -1
- package/build/cjs/utils/envToBool.js +2 -15
- package/build/cjs/utils/envToBool.js.map +1 -1
- package/build/cjs/utils/envelope.js +39 -133
- package/build/cjs/utils/envelope.js.map +1 -1
- package/build/cjs/utils/error.js +3 -10
- package/build/cjs/utils/error.js.map +1 -1
- package/build/cjs/utils/eventUtils.js +0 -8
- package/build/cjs/utils/eventUtils.js.map +1 -1
- package/build/cjs/utils/eventbuilder.js +30 -114
- package/build/cjs/utils/eventbuilder.js.map +1 -1
- package/build/cjs/utils/exports.js +5 -24
- package/build/cjs/utils/exports.js.map +1 -1
- package/build/cjs/utils/featureFlags.js +10 -96
- package/build/cjs/utils/featureFlags.js.map +1 -1
- package/build/cjs/utils/flushIfServerless.js +14 -48
- package/build/cjs/utils/flushIfServerless.js.map +1 -1
- package/build/cjs/utils/get-default-export.js +1 -25
- package/build/cjs/utils/get-default-export.js.map +1 -1
- package/build/cjs/utils/handleCallbackErrors.js +10 -48
- package/build/cjs/utils/handleCallbackErrors.js.map +1 -1
- package/build/cjs/utils/hasSpansEnabled.js +4 -28
- package/build/cjs/utils/hasSpansEnabled.js.map +1 -1
- package/build/cjs/utils/ipAddress.js +7 -19
- package/build/cjs/utils/ipAddress.js.map +1 -1
- package/build/cjs/utils/is.js +18 -163
- package/build/cjs/utils/is.js.map +1 -1
- package/build/cjs/utils/isBrowser.js +3 -9
- package/build/cjs/utils/isBrowser.js.map +1 -1
- package/build/cjs/utils/isSentryRequestUrl.js +2 -19
- package/build/cjs/utils/isSentryRequestUrl.js.map +1 -1
- package/build/cjs/utils/lru.js +13 -24
- package/build/cjs/utils/lru.js.map +1 -1
- package/build/cjs/utils/merge.js +1 -17
- package/build/cjs/utils/merge.js.map +1 -1
- package/build/cjs/utils/meta.js +1 -24
- package/build/cjs/utils/meta.js.map +1 -1
- package/build/cjs/utils/misc.js +31 -134
- package/build/cjs/utils/misc.js.map +1 -1
- package/build/cjs/utils/node-stack-trace.js +22 -61
- package/build/cjs/utils/node-stack-trace.js.map +1 -1
- package/build/cjs/utils/node.js +3 -48
- package/build/cjs/utils/node.js.map +1 -1
- package/build/cjs/utils/normalizationHints.js +5 -18
- package/build/cjs/utils/normalizationHints.js.map +1 -1
- package/build/cjs/utils/normalize.js +39 -205
- package/build/cjs/utils/normalize.js.map +1 -1
- package/build/cjs/utils/object.js +33 -168
- package/build/cjs/utils/object.js.map +1 -1
- package/build/cjs/utils/parameterize.js +2 -21
- package/build/cjs/utils/parameterize.js.map +1 -1
- package/build/cjs/utils/parseSampleRate.js +4 -13
- package/build/cjs/utils/parseSampleRate.js.map +1 -1
- package/build/cjs/utils/path.js +28 -115
- package/build/cjs/utils/path.js.map +1 -1
- package/build/cjs/utils/prepareEvent.js +53 -191
- package/build/cjs/utils/prepareEvent.js.map +1 -1
- package/build/cjs/utils/promisebuffer.js +5 -47
- package/build/cjs/utils/promisebuffer.js.map +1 -1
- package/build/cjs/utils/propagationContext.js +0 -7
- package/build/cjs/utils/propagationContext.js.map +1 -1
- package/build/cjs/utils/randomSafeContext.js +3 -22
- package/build/cjs/utils/randomSafeContext.js.map +1 -1
- package/build/cjs/utils/ratelimit.js +13 -66
- package/build/cjs/utils/ratelimit.js.map +1 -1
- package/build/cjs/utils/request.js +62 -269
- package/build/cjs/utils/request.js.map +1 -1
- package/build/cjs/utils/scopeData.js +15 -79
- package/build/cjs/utils/scopeData.js.map +1 -1
- package/build/cjs/utils/sdkMetadata.js +5 -19
- package/build/cjs/utils/sdkMetadata.js.map +1 -1
- package/build/cjs/utils/severity.js +1 -9
- package/build/cjs/utils/severity.js.map +1 -1
- package/build/cjs/utils/should-ignore-span.js +6 -38
- package/build/cjs/utils/should-ignore-span.js.map +1 -1
- package/build/cjs/utils/spanOnScope.js +3 -14
- package/build/cjs/utils/spanOnScope.js.map +1 -1
- package/build/cjs/utils/spanUtils.js +42 -222
- package/build/cjs/utils/spanUtils.js.map +1 -1
- package/build/cjs/utils/stacktrace.js +19 -106
- package/build/cjs/utils/stacktrace.js.map +1 -1
- package/build/cjs/utils/string.js +7 -75
- package/build/cjs/utils/string.js.map +1 -1
- package/build/cjs/utils/supports.js +14 -99
- package/build/cjs/utils/supports.js.map +1 -1
- package/build/cjs/utils/syncpromise.js +19 -68
- package/build/cjs/utils/syncpromise.js.map +1 -1
- package/build/cjs/utils/time.js +7 -84
- package/build/cjs/utils/time.js.map +1 -1
- package/build/cjs/utils/timer.js +1 -10
- package/build/cjs/utils/timer.js.map +1 -1
- package/build/cjs/utils/timestampSequence.js +5 -21
- package/build/cjs/utils/timestampSequence.js.map +1 -1
- package/build/cjs/utils/trace-info.js +3 -10
- package/build/cjs/utils/trace-info.js.map +1 -1
- package/build/cjs/utils/traceData.js +4 -39
- package/build/cjs/utils/traceData.js.map +1 -1
- package/build/cjs/utils/tracePropagationTargets.js +4 -18
- package/build/cjs/utils/tracePropagationTargets.js.map +1 -1
- package/build/cjs/utils/tracing.js +32 -106
- package/build/cjs/utils/tracing.js.map +1 -1
- package/build/cjs/utils/transactionEvent.js +11 -19
- package/build/cjs/utils/transactionEvent.js.map +1 -1
- package/build/cjs/utils/tunnel.js +12 -33
- package/build/cjs/utils/tunnel.js.map +1 -1
- package/build/cjs/utils/url.js +42 -176
- package/build/cjs/utils/url.js.map +1 -1
- package/build/cjs/utils/vercelWaitUntil.js +4 -12
- package/build/cjs/utils/vercelWaitUntil.js.map +1 -1
- package/build/cjs/utils/version.js +1 -3
- package/build/cjs/utils/version.js.map +1 -1
- package/build/cjs/utils/weakRef.js +5 -36
- package/build/cjs/utils/weakRef.js.map +1 -1
- package/build/cjs/utils/worldwide.js +1 -4
- package/build/cjs/utils/worldwide.js.map +1 -1
- package/build/cjs/vendor/escapeStringForRegex.js +1 -32
- package/build/cjs/vendor/escapeStringForRegex.js.map +1 -1
- package/build/cjs/vendor/getIpAddress.js +19 -99
- package/build/cjs/vendor/getIpAddress.js.map +1 -1
- package/build/esm/api.js +10 -34
- package/build/esm/api.js.map +1 -1
- package/build/esm/asyncContext/index.js +0 -14
- package/build/esm/asyncContext/index.js.map +1 -1
- package/build/esm/asyncContext/stackStrategy.js +16 -47
- package/build/esm/asyncContext/stackStrategy.js.map +1 -1
- package/build/esm/attributes.js +17 -95
- package/build/esm/attributes.js.map +1 -1
- package/build/esm/breadcrumbs.js +2 -22
- package/build/esm/breadcrumbs.js.map +1 -1
- package/build/esm/browser.js +5 -1
- package/build/esm/browser.js.map +1 -1
- package/build/esm/carrier.js +5 -42
- package/build/esm/carrier.js.map +1 -1
- package/build/esm/checkin.js +5 -19
- package/build/esm/checkin.js.map +1 -1
- package/build/esm/client.js +216 -585
- package/build/esm/client.js.map +1 -1
- package/build/esm/constants.js +2 -2
- package/build/esm/currentScopes.js +5 -86
- package/build/esm/currentScopes.js.map +1 -1
- package/build/esm/debug-build.js +0 -5
- package/build/esm/debug-build.js.map +1 -1
- package/build/esm/defaultScopes.js +2 -5
- package/build/esm/defaultScopes.js.map +1 -1
- package/build/esm/envelope.js +32 -103
- package/build/esm/envelope.js.map +1 -1
- package/build/esm/eventProcessors.js +4 -23
- package/build/esm/eventProcessors.js.map +1 -1
- package/build/esm/exports.js +21 -197
- package/build/esm/exports.js.map +1 -1
- package/build/esm/feedback.js +7 -19
- package/build/esm/feedback.js.map +1 -1
- package/build/esm/fetch.js +66 -201
- package/build/esm/fetch.js.map +1 -1
- package/build/esm/index.js +7 -1
- package/build/esm/index.js.map +1 -1
- package/build/esm/instrument/console.js +9 -41
- package/build/esm/instrument/console.js.map +1 -1
- package/build/esm/instrument/fetch.js +47 -156
- package/build/esm/instrument/fetch.js.map +1 -1
- package/build/esm/instrument/globalError.js +4 -25
- package/build/esm/instrument/globalError.js.map +1 -1
- package/build/esm/instrument/globalUnhandledRejection.js +4 -21
- package/build/esm/instrument/globalUnhandledRejection.js.map +1 -1
- package/build/esm/instrument/handlers.js +9 -21
- package/build/esm/instrument/handlers.js.map +1 -1
- package/build/esm/integration.js +13 -77
- package/build/esm/integration.js.map +1 -1
- package/build/esm/integrations/captureconsole.js +16 -40
- package/build/esm/integrations/captureconsole.js.map +1 -1
- package/build/esm/integrations/consola.js +57 -163
- package/build/esm/integrations/consola.js.map +1 -1
- package/build/esm/integrations/console.js +11 -43
- package/build/esm/integrations/console.js.map +1 -1
- package/build/esm/integrations/conversationId.js +5 -22
- package/build/esm/integrations/conversationId.js.map +1 -1
- package/build/esm/integrations/dedupe.js +16 -74
- package/build/esm/integrations/dedupe.js.map +1 -1
- package/build/esm/integrations/eventFilters.js +63 -114
- package/build/esm/integrations/eventFilters.js.map +1 -1
- package/build/esm/integrations/express/index.js +30 -145
- package/build/esm/integrations/express/index.js.map +1 -1
- package/build/esm/integrations/express/patch-layer.js +20 -130
- package/build/esm/integrations/express/patch-layer.js.map +1 -1
- package/build/esm/integrations/express/request-layer-store.js +1 -3
- package/build/esm/integrations/express/request-layer-store.js.map +1 -1
- package/build/esm/integrations/express/set-sdk-processing-metadata.js +0 -2
- package/build/esm/integrations/express/set-sdk-processing-metadata.js.map +1 -1
- package/build/esm/integrations/express/types.js +6 -7
- package/build/esm/integrations/express/types.js.map +1 -1
- package/build/esm/integrations/express/utils.js +37 -145
- package/build/esm/integrations/express/utils.js.map +1 -1
- package/build/esm/integrations/extraerrordata.js +24 -69
- package/build/esm/integrations/extraerrordata.js.map +1 -1
- package/build/esm/integrations/featureFlags/featureFlagsIntegration.js +3 -29
- package/build/esm/integrations/featureFlags/featureFlagsIntegration.js.map +1 -1
- package/build/esm/integrations/featureFlags/growthbook.js +11 -40
- package/build/esm/integrations/featureFlags/growthbook.js.map +1 -1
- package/build/esm/integrations/functiontostring.js +6 -27
- package/build/esm/integrations/functiontostring.js.map +1 -1
- package/build/esm/integrations/http/add-outgoing-request-breadcrumb.js +10 -18
- package/build/esm/integrations/http/add-outgoing-request-breadcrumb.js.map +1 -1
- package/build/esm/integrations/http/client-patch.js +8 -70
- package/build/esm/integrations/http/client-patch.js.map +1 -1
- package/build/esm/integrations/http/client-subscriptions.js +22 -59
- package/build/esm/integrations/http/client-subscriptions.js.map +1 -1
- package/build/esm/integrations/http/constants.js +3 -3
- package/build/esm/integrations/http/double-wrap-warning.js +10 -18
- package/build/esm/integrations/http/double-wrap-warning.js.map +1 -1
- package/build/esm/integrations/http/get-outgoing-span-data.js +30 -47
- package/build/esm/integrations/http/get-outgoing-span-data.js.map +1 -1
- package/build/esm/integrations/http/get-request-url.js +7 -24
- package/build/esm/integrations/http/get-request-url.js.map +1 -1
- package/build/esm/integrations/http/inject-trace-propagation-headers.js +14 -38
- package/build/esm/integrations/http/inject-trace-propagation-headers.js.map +1 -1
- package/build/esm/integrations/http/patch-request-to-capture-body.js +78 -0
- package/build/esm/integrations/http/patch-request-to-capture-body.js.map +1 -0
- package/build/esm/integrations/http/record-request-session.js +59 -0
- package/build/esm/integrations/http/record-request-session.js.map +1 -0
- package/build/esm/integrations/http/server-subscription.js +285 -0
- package/build/esm/integrations/http/server-subscription.js.map +1 -0
- package/build/esm/integrations/linkederrors.js +6 -11
- package/build/esm/integrations/linkederrors.js.map +1 -1
- package/build/esm/integrations/mcp-server/attributeExtraction.js +26 -69
- package/build/esm/integrations/mcp-server/attributeExtraction.js.map +1 -1
- package/build/esm/integrations/mcp-server/attributes.js +30 -138
- package/build/esm/integrations/mcp-server/attributes.js.map +1 -1
- package/build/esm/integrations/mcp-server/correlation.js +20 -91
- package/build/esm/integrations/mcp-server/correlation.js.map +1 -1
- package/build/esm/integrations/mcp-server/errorCapture.js +6 -25
- package/build/esm/integrations/mcp-server/errorCapture.js.map +1 -1
- package/build/esm/integrations/mcp-server/handlers.js +55 -169
- package/build/esm/integrations/mcp-server/handlers.js.map +1 -1
- package/build/esm/integrations/mcp-server/index.js +7 -60
- package/build/esm/integrations/mcp-server/index.js.map +1 -1
- package/build/esm/integrations/mcp-server/methodConfig.js +21 -59
- package/build/esm/integrations/mcp-server/methodConfig.js.map +1 -1
- package/build/esm/integrations/mcp-server/piiFiltering.js +5 -33
- package/build/esm/integrations/mcp-server/piiFiltering.js.map +1 -1
- package/build/esm/integrations/mcp-server/resultExtraction.js +20 -76
- package/build/esm/integrations/mcp-server/resultExtraction.js.map +1 -1
- package/build/esm/integrations/mcp-server/sessionExtraction.js +30 -121
- package/build/esm/integrations/mcp-server/sessionExtraction.js.map +1 -1
- package/build/esm/integrations/mcp-server/sessionManagement.js +2 -60
- package/build/esm/integrations/mcp-server/sessionManagement.js.map +1 -1
- package/build/esm/integrations/mcp-server/spans.js +20 -107
- package/build/esm/integrations/mcp-server/spans.js.map +1 -1
- package/build/esm/integrations/mcp-server/transport.js +26 -94
- package/build/esm/integrations/mcp-server/transport.js.map +1 -1
- package/build/esm/integrations/mcp-server/validation.js +6 -72
- package/build/esm/integrations/mcp-server/validation.js.map +1 -1
- package/build/esm/integrations/moduleMetadata.js +6 -20
- package/build/esm/integrations/moduleMetadata.js.map +1 -1
- package/build/esm/integrations/postgresjs.js +78 -287
- package/build/esm/integrations/postgresjs.js.map +1 -1
- package/build/esm/integrations/requestdata.js +30 -93
- package/build/esm/integrations/requestdata.js.map +1 -1
- package/build/esm/integrations/rewriteframes.js +14 -45
- package/build/esm/integrations/rewriteframes.js.map +1 -1
- package/build/esm/integrations/spanStreaming.js +9 -15
- package/build/esm/integrations/spanStreaming.js.map +1 -1
- package/build/esm/integrations/supabase.js +224 -333
- package/build/esm/integrations/supabase.js.map +1 -1
- package/build/esm/integrations/third-party-errors-filter.js +60 -85
- package/build/esm/integrations/third-party-errors-filter.js.map +1 -1
- package/build/esm/integrations/zoderrors.js +35 -111
- package/build/esm/integrations/zoderrors.js.map +1 -1
- package/build/esm/logs/console-integration.js +15 -50
- package/build/esm/logs/console-integration.js.map +1 -1
- package/build/esm/logs/constants.js +1 -6
- package/build/esm/logs/constants.js.map +1 -1
- package/build/esm/logs/envelope.js +10 -40
- package/build/esm/logs/envelope.js.map +1 -1
- package/build/esm/logs/internal.js +53 -126
- package/build/esm/logs/internal.js.map +1 -1
- package/build/esm/logs/public-api.js +13 -228
- package/build/esm/logs/public-api.js.map +1 -1
- package/build/esm/logs/utils.js +6 -47
- package/build/esm/logs/utils.js.map +1 -1
- package/build/esm/metadata.js +6 -51
- package/build/esm/metadata.js.map +1 -1
- package/build/esm/metrics/envelope.js +12 -45
- package/build/esm/metrics/envelope.js.map +1 -1
- package/build/esm/metrics/internal.js +31 -144
- package/build/esm/metrics/internal.js.map +1 -1
- package/build/esm/metrics/public-api.js +4 -109
- package/build/esm/metrics/public-api.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/esm/profiling.js +11 -41
- package/build/esm/profiling.js.map +1 -1
- package/build/esm/scope.js +73 -224
- package/build/esm/scope.js.map +1 -1
- package/build/esm/sdk.js +2 -21
- package/build/esm/sdk.js.map +1 -1
- package/build/esm/semanticAttributes.js +31 -118
- package/build/esm/semanticAttributes.js.map +1 -1
- package/build/esm/server-runtime-client.js +32 -87
- package/build/esm/server-runtime-client.js.map +1 -1
- package/build/esm/server.js +7 -1
- package/build/esm/server.js.map +1 -1
- package/build/esm/session.js +14 -67
- package/build/esm/session.js.map +1 -1
- package/build/esm/tracing/ai/gen-ai-attributes.js +45 -249
- package/build/esm/tracing/ai/gen-ai-attributes.js.map +1 -1
- package/build/esm/tracing/ai/mediaStripping.js +21 -116
- package/build/esm/tracing/ai/mediaStripping.js.map +1 -1
- package/build/esm/tracing/ai/messageTruncation.js +26 -212
- package/build/esm/tracing/ai/messageTruncation.js.map +1 -1
- package/build/esm/tracing/ai/utils.js +40 -180
- package/build/esm/tracing/ai/utils.js.map +1 -1
- package/build/esm/tracing/anthropic-ai/constants.js +9 -12
- package/build/esm/tracing/anthropic-ai/constants.js.map +1 -1
- package/build/esm/tracing/anthropic-ai/index.js +67 -172
- package/build/esm/tracing/anthropic-ai/index.js.map +1 -1
- package/build/esm/tracing/anthropic-ai/streaming.js +45 -149
- package/build/esm/tracing/anthropic-ai/streaming.js.map +1 -1
- package/build/esm/tracing/anthropic-ai/utils.js +17 -47
- package/build/esm/tracing/anthropic-ai/utils.js.map +1 -1
- package/build/esm/tracing/dynamicSamplingContext.js +18 -85
- package/build/esm/tracing/dynamicSamplingContext.js.map +1 -1
- package/build/esm/tracing/errors.js +2 -14
- package/build/esm/tracing/errors.js.map +1 -1
- package/build/esm/tracing/google-genai/constants.js +9 -16
- package/build/esm/tracing/google-genai/constants.js.map +1 -1
- package/build/esm/tracing/google-genai/index.js +79 -223
- package/build/esm/tracing/google-genai/index.js.map +1 -1
- package/build/esm/tracing/google-genai/streaming.js +11 -56
- package/build/esm/tracing/google-genai/streaming.js.map +1 -1
- package/build/esm/tracing/google-genai/utils.js +8 -13
- package/build/esm/tracing/google-genai/utils.js.map +1 -1
- package/build/esm/tracing/idleSpan.js +48 -174
- package/build/esm/tracing/idleSpan.js.map +1 -1
- package/build/esm/tracing/langchain/constants.js +8 -9
- package/build/esm/tracing/langchain/constants.js.map +1 -1
- package/build/esm/tracing/langchain/embeddings.js +31 -75
- package/build/esm/tracing/langchain/embeddings.js.map +1 -1
- package/build/esm/tracing/langchain/index.js +64 -161
- package/build/esm/tracing/langchain/index.js.map +1 -1
- package/build/esm/tracing/langchain/utils.js +101 -312
- package/build/esm/tracing/langchain/utils.js.map +1 -1
- package/build/esm/tracing/langgraph/constants.js +2 -2
- package/build/esm/tracing/langgraph/index.js +59 -162
- package/build/esm/tracing/langgraph/index.js.map +1 -1
- package/build/esm/tracing/langgraph/utils.js +54 -170
- package/build/esm/tracing/langgraph/utils.js.map +1 -1
- package/build/esm/tracing/logSpans.js +10 -26
- package/build/esm/tracing/logSpans.js.map +1 -1
- package/build/esm/tracing/measurement.js +6 -18
- package/build/esm/tracing/measurement.js.map +1 -1
- package/build/esm/tracing/openai/constants.js +20 -24
- package/build/esm/tracing/openai/constants.js.map +1 -1
- package/build/esm/tracing/openai/index.js +52 -132
- package/build/esm/tracing/openai/index.js.map +1 -1
- package/build/esm/tracing/openai/streaming.js +24 -102
- package/build/esm/tracing/openai/streaming.js.map +1 -1
- package/build/esm/tracing/openai/utils.js +36 -107
- package/build/esm/tracing/openai/utils.js.map +1 -1
- package/build/esm/tracing/sampling.js +23 -63
- package/build/esm/tracing/sampling.js.map +1 -1
- package/build/esm/tracing/sentryNonRecordingSpan.js +15 -40
- package/build/esm/tracing/sentryNonRecordingSpan.js.map +1 -1
- package/build/esm/tracing/sentrySpan.js +66 -172
- package/build/esm/tracing/sentrySpan.js.map +1 -1
- package/build/esm/tracing/spans/beforeSendSpan.js +4 -32
- package/build/esm/tracing/spans/beforeSendSpan.js.map +1 -1
- package/build/esm/tracing/spans/captureSpan.js +59 -157
- package/build/esm/tracing/spans/captureSpan.js.map +1 -1
- package/build/esm/tracing/spans/envelope.js +12 -24
- package/build/esm/tracing/spans/envelope.js.map +1 -1
- package/build/esm/tracing/spans/estimateSize.js +0 -22
- package/build/esm/tracing/spans/estimateSize.js.map +1 -1
- package/build/esm/tracing/spans/extractGenAiSpans.js +11 -33
- package/build/esm/tracing/spans/extractGenAiSpans.js.map +1 -1
- package/build/esm/tracing/spans/hasSpanStreamingEnabled.js +1 -4
- package/build/esm/tracing/spans/hasSpanStreamingEnabled.js.map +1 -1
- package/build/esm/tracing/spans/scopeContextAttributes.js +56 -0
- package/build/esm/tracing/spans/scopeContextAttributes.js.map +1 -0
- package/build/esm/tracing/spans/spanBuffer.js +21 -71
- package/build/esm/tracing/spans/spanBuffer.js.map +1 -1
- package/build/esm/tracing/spans/spanJsonToStreamedSpan.js +4 -8
- package/build/esm/tracing/spans/spanJsonToStreamedSpan.js.map +1 -1
- package/build/esm/tracing/spanstatus.js +15 -32
- package/build/esm/tracing/spanstatus.js.map +1 -1
- package/build/esm/tracing/trace.js +95 -311
- package/build/esm/tracing/trace.js.map +1 -1
- package/build/esm/tracing/utils.js +4 -14
- package/build/esm/tracing/utils.js.map +1 -1
- package/build/esm/tracing/vercel-ai/constants.js +15 -26
- package/build/esm/tracing/vercel-ai/constants.js.map +1 -1
- package/build/esm/tracing/vercel-ai/index.js +84 -288
- package/build/esm/tracing/vercel-ai/index.js.map +1 -1
- package/build/esm/tracing/vercel-ai/utils.js +30 -128
- package/build/esm/tracing/vercel-ai/utils.js.map +1 -1
- package/build/esm/tracing/vercel-ai/vercel-ai-attributes.js +22 -229
- package/build/esm/tracing/vercel-ai/vercel-ai-attributes.js.map +1 -1
- package/build/esm/transports/base.js +32 -67
- package/build/esm/transports/base.js.map +1 -1
- package/build/esm/transports/multiplexed.js +38 -103
- package/build/esm/transports/multiplexed.js.map +1 -1
- package/build/esm/transports/offline.js +31 -72
- package/build/esm/transports/offline.js.map +1 -1
- package/build/esm/transports/userAgent.js +4 -13
- package/build/esm/transports/userAgent.js.map +1 -1
- package/build/esm/trpc.js +19 -39
- package/build/esm/trpc.js.map +1 -1
- package/build/esm/utils/aggregate-errors.js +18 -62
- package/build/esm/utils/aggregate-errors.js.map +1 -1
- package/build/esm/utils/ai/providerSkip.js +3 -50
- package/build/esm/utils/ai/providerSkip.js.map +1 -1
- package/build/esm/utils/anr.js +7 -36
- package/build/esm/utils/anr.js.map +1 -1
- package/build/esm/utils/baggage.js +37 -146
- package/build/esm/utils/baggage.js.map +1 -1
- package/build/esm/utils/breadcrumb-log-level.js +5 -9
- package/build/esm/utils/breadcrumb-log-level.js.map +1 -1
- package/build/esm/utils/browser.js +24 -86
- package/build/esm/utils/browser.js.map +1 -1
- package/build/esm/utils/chain-and-copy-promiselike.js +10 -27
- package/build/esm/utils/chain-and-copy-promiselike.js.map +1 -1
- package/build/esm/utils/clientreport.js +4 -13
- package/build/esm/utils/clientreport.js.map +1 -1
- package/build/esm/utils/cookie.js +6 -53
- package/build/esm/utils/cookie.js.map +1 -1
- package/build/esm/utils/data-collection/defaultPiiToCollectionOptions.js +26 -0
- package/build/esm/utils/data-collection/defaultPiiToCollectionOptions.js.map +1 -0
- package/build/esm/utils/data-collection/filterCookies.js +21 -0
- package/build/esm/utils/data-collection/filterCookies.js.map +1 -0
- package/build/esm/utils/data-collection/filterKeyValueData.js +41 -0
- package/build/esm/utils/data-collection/filterKeyValueData.js.map +1 -0
- package/build/esm/utils/data-collection/filterQueryParams.js +24 -0
- package/build/esm/utils/data-collection/filterQueryParams.js.map +1 -0
- package/build/esm/utils/data-collection/filtering-snippets.js +56 -0
- package/build/esm/utils/data-collection/filtering-snippets.js.map +1 -0
- package/build/esm/utils/data-collection/resolveDataCollectionOptions.js +35 -0
- package/build/esm/utils/data-collection/resolveDataCollectionOptions.js.map +1 -0
- package/build/esm/utils/debounce.js +5 -32
- package/build/esm/utils/debounce.js.map +1 -1
- package/build/esm/utils/debug-ids.js +4 -42
- package/build/esm/utils/debug-ids.js.map +1 -1
- package/build/esm/utils/debug-logger.js +23 -56
- package/build/esm/utils/debug-logger.js.map +1 -1
- package/build/esm/utils/dsn.js +18 -81
- package/build/esm/utils/dsn.js.map +1 -1
- package/build/esm/utils/env.js +3 -27
- package/build/esm/utils/env.js.map +1 -1
- package/build/esm/utils/envToBool.js +2 -15
- package/build/esm/utils/envToBool.js.map +1 -1
- package/build/esm/utils/envelope.js +39 -133
- package/build/esm/utils/envelope.js.map +1 -1
- package/build/esm/utils/error.js +3 -10
- package/build/esm/utils/error.js.map +1 -1
- package/build/esm/utils/eventUtils.js +0 -8
- package/build/esm/utils/eventUtils.js.map +1 -1
- package/build/esm/utils/eventbuilder.js +30 -114
- package/build/esm/utils/eventbuilder.js.map +1 -1
- package/build/esm/utils/exports.js +5 -24
- package/build/esm/utils/exports.js.map +1 -1
- package/build/esm/utils/featureFlags.js +10 -96
- package/build/esm/utils/featureFlags.js.map +1 -1
- package/build/esm/utils/flushIfServerless.js +14 -48
- package/build/esm/utils/flushIfServerless.js.map +1 -1
- package/build/esm/utils/get-default-export.js +1 -25
- package/build/esm/utils/get-default-export.js.map +1 -1
- package/build/esm/utils/handleCallbackErrors.js +10 -48
- package/build/esm/utils/handleCallbackErrors.js.map +1 -1
- package/build/esm/utils/hasSpansEnabled.js +4 -28
- package/build/esm/utils/hasSpansEnabled.js.map +1 -1
- package/build/esm/utils/ipAddress.js +7 -19
- package/build/esm/utils/ipAddress.js.map +1 -1
- package/build/esm/utils/is.js +18 -163
- package/build/esm/utils/is.js.map +1 -1
- package/build/esm/utils/isBrowser.js +3 -9
- package/build/esm/utils/isBrowser.js.map +1 -1
- package/build/esm/utils/isSentryRequestUrl.js +2 -19
- package/build/esm/utils/isSentryRequestUrl.js.map +1 -1
- package/build/esm/utils/lru.js +13 -24
- package/build/esm/utils/lru.js.map +1 -1
- package/build/esm/utils/merge.js +1 -17
- package/build/esm/utils/merge.js.map +1 -1
- package/build/esm/utils/meta.js +1 -24
- package/build/esm/utils/meta.js.map +1 -1
- package/build/esm/utils/misc.js +31 -134
- package/build/esm/utils/misc.js.map +1 -1
- package/build/esm/utils/node-stack-trace.js +22 -61
- package/build/esm/utils/node-stack-trace.js.map +1 -1
- package/build/esm/utils/node.js +3 -48
- package/build/esm/utils/node.js.map +1 -1
- package/build/esm/utils/normalizationHints.js +5 -18
- package/build/esm/utils/normalizationHints.js.map +1 -1
- package/build/esm/utils/normalize.js +39 -205
- package/build/esm/utils/normalize.js.map +1 -1
- package/build/esm/utils/object.js +33 -168
- package/build/esm/utils/object.js.map +1 -1
- package/build/esm/utils/parameterize.js +2 -21
- package/build/esm/utils/parameterize.js.map +1 -1
- package/build/esm/utils/parseSampleRate.js +4 -13
- package/build/esm/utils/parseSampleRate.js.map +1 -1
- package/build/esm/utils/path.js +28 -115
- package/build/esm/utils/path.js.map +1 -1
- package/build/esm/utils/prepareEvent.js +53 -191
- package/build/esm/utils/prepareEvent.js.map +1 -1
- package/build/esm/utils/promisebuffer.js +5 -47
- package/build/esm/utils/promisebuffer.js.map +1 -1
- package/build/esm/utils/propagationContext.js +0 -7
- package/build/esm/utils/propagationContext.js.map +1 -1
- package/build/esm/utils/randomSafeContext.js +3 -22
- package/build/esm/utils/randomSafeContext.js.map +1 -1
- package/build/esm/utils/ratelimit.js +13 -66
- package/build/esm/utils/ratelimit.js.map +1 -1
- package/build/esm/utils/request.js +62 -269
- package/build/esm/utils/request.js.map +1 -1
- package/build/esm/utils/scopeData.js +15 -79
- package/build/esm/utils/scopeData.js.map +1 -1
- package/build/esm/utils/sdkMetadata.js +5 -19
- package/build/esm/utils/sdkMetadata.js.map +1 -1
- package/build/esm/utils/severity.js +1 -9
- package/build/esm/utils/severity.js.map +1 -1
- package/build/esm/utils/should-ignore-span.js +6 -38
- package/build/esm/utils/should-ignore-span.js.map +1 -1
- package/build/esm/utils/spanOnScope.js +3 -14
- package/build/esm/utils/spanOnScope.js.map +1 -1
- package/build/esm/utils/spanUtils.js +42 -222
- package/build/esm/utils/spanUtils.js.map +1 -1
- package/build/esm/utils/stacktrace.js +19 -106
- package/build/esm/utils/stacktrace.js.map +1 -1
- package/build/esm/utils/string.js +7 -75
- package/build/esm/utils/string.js.map +1 -1
- package/build/esm/utils/supports.js +14 -99
- package/build/esm/utils/supports.js.map +1 -1
- package/build/esm/utils/syncpromise.js +19 -68
- package/build/esm/utils/syncpromise.js.map +1 -1
- package/build/esm/utils/time.js +7 -84
- package/build/esm/utils/time.js.map +1 -1
- package/build/esm/utils/timer.js +1 -10
- package/build/esm/utils/timer.js.map +1 -1
- package/build/esm/utils/timestampSequence.js +5 -21
- package/build/esm/utils/timestampSequence.js.map +1 -1
- package/build/esm/utils/trace-info.js +3 -10
- package/build/esm/utils/trace-info.js.map +1 -1
- package/build/esm/utils/traceData.js +4 -39
- package/build/esm/utils/traceData.js.map +1 -1
- package/build/esm/utils/tracePropagationTargets.js +4 -18
- package/build/esm/utils/tracePropagationTargets.js.map +1 -1
- package/build/esm/utils/tracing.js +32 -106
- package/build/esm/utils/tracing.js.map +1 -1
- package/build/esm/utils/transactionEvent.js +11 -19
- package/build/esm/utils/transactionEvent.js.map +1 -1
- package/build/esm/utils/tunnel.js +12 -33
- package/build/esm/utils/tunnel.js.map +1 -1
- package/build/esm/utils/url.js +42 -176
- package/build/esm/utils/url.js.map +1 -1
- package/build/esm/utils/vercelWaitUntil.js +4 -12
- package/build/esm/utils/vercelWaitUntil.js.map +1 -1
- package/build/esm/utils/version.js +1 -3
- package/build/esm/utils/version.js.map +1 -1
- package/build/esm/utils/weakRef.js +5 -36
- package/build/esm/utils/weakRef.js.map +1 -1
- package/build/esm/utils/worldwide.js +1 -4
- package/build/esm/utils/worldwide.js.map +1 -1
- package/build/esm/vendor/escapeStringForRegex.js +1 -32
- package/build/esm/vendor/escapeStringForRegex.js.map +1 -1
- package/build/esm/vendor/getIpAddress.js +19 -99
- package/build/esm/vendor/getIpAddress.js.map +1 -1
- package/build/types/api.d.ts +2 -2
- package/build/types/api.d.ts.map +1 -1
- package/build/types/attributes.d.ts +5 -8
- package/build/types/attributes.d.ts.map +1 -1
- package/build/types/breadcrumbs.d.ts +1 -1
- package/build/types/breadcrumbs.d.ts.map +1 -1
- package/build/types/browser-exports.d.ts +3 -3
- package/build/types/browser-exports.d.ts.map +1 -1
- package/build/types/carrier.d.ts +2 -2
- package/build/types/carrier.d.ts.map +1 -1
- package/build/types/checkin.d.ts +4 -4
- package/build/types/checkin.d.ts.map +1 -1
- package/build/types/client.d.ts +32 -22
- package/build/types/client.d.ts.map +1 -1
- package/build/types/currentScopes.d.ts +1 -1
- package/build/types/currentScopes.d.ts.map +1 -1
- package/build/types/envelope.d.ts +7 -7
- package/build/types/envelope.d.ts.map +1 -1
- package/build/types/eventProcessors.d.ts +2 -2
- package/build/types/eventProcessors.d.ts.map +1 -1
- package/build/types/exports.d.ts +8 -8
- package/build/types/exports.d.ts.map +1 -1
- package/build/types/feedback.d.ts +2 -2
- package/build/types/feedback.d.ts.map +1 -1
- package/build/types/fetch.d.ts +3 -3
- package/build/types/fetch.d.ts.map +1 -1
- package/build/types/instrument/console.d.ts +1 -1
- package/build/types/instrument/console.d.ts.map +1 -1
- package/build/types/instrument/fetch.d.ts +1 -1
- package/build/types/instrument/fetch.d.ts.map +1 -1
- package/build/types/instrument/globalError.d.ts +1 -1
- package/build/types/instrument/globalError.d.ts.map +1 -1
- package/build/types/instrument/globalUnhandledRejection.d.ts +1 -1
- package/build/types/instrument/globalUnhandledRejection.d.ts.map +1 -1
- package/build/types/integration.d.ts +2 -2
- package/build/types/integration.d.ts.map +1 -1
- package/build/types/integrations/consola.d.ts +1 -1
- package/build/types/integrations/consola.d.ts.map +1 -1
- package/build/types/integrations/console.d.ts +1 -1
- package/build/types/integrations/console.d.ts.map +1 -1
- package/build/types/integrations/dedupe.d.ts +1 -1
- package/build/types/integrations/dedupe.d.ts.map +1 -1
- package/build/types/integrations/express/types.d.ts +2 -2
- package/build/types/integrations/express/types.d.ts.map +1 -1
- package/build/types/integrations/express/utils.d.ts +1 -1
- package/build/types/integrations/express/utils.d.ts.map +1 -1
- package/build/types/integrations/featureFlags/featureFlagsIntegration.d.ts +1 -1
- package/build/types/integrations/featureFlags/featureFlagsIntegration.d.ts.map +1 -1
- package/build/types/integrations/featureFlags/growthbook.d.ts +1 -1
- package/build/types/integrations/featureFlags/growthbook.d.ts.map +1 -1
- package/build/types/integrations/http/double-wrap-warning.d.ts +1 -1
- package/build/types/integrations/http/double-wrap-warning.d.ts.map +1 -1
- package/build/types/integrations/http/get-outgoing-span-data.d.ts +2 -2
- package/build/types/integrations/http/get-outgoing-span-data.d.ts.map +1 -1
- package/build/types/integrations/http/patch-request-to-capture-body.d.ts +12 -0
- package/build/types/integrations/http/patch-request-to-capture-body.d.ts.map +1 -0
- package/build/types/integrations/http/record-request-session.d.ts +18 -0
- package/build/types/integrations/http/record-request-session.d.ts.map +1 -0
- package/build/types/integrations/http/server-subscription.d.ts +26 -0
- package/build/types/integrations/http/server-subscription.d.ts.map +1 -0
- package/build/types/integrations/http/types.d.ts +12 -6
- package/build/types/integrations/http/types.d.ts.map +1 -1
- package/build/types/integrations/mcp-server/correlation.d.ts +1 -1
- package/build/types/integrations/mcp-server/correlation.d.ts.map +1 -1
- package/build/types/integrations/mcp-server/piiFiltering.d.ts +1 -1
- package/build/types/integrations/mcp-server/piiFiltering.d.ts.map +1 -1
- package/build/types/integrations/mcp-server/types.d.ts +1 -1
- package/build/types/integrations/mcp-server/types.d.ts.map +1 -1
- package/build/types/integrations/postgresjs.d.ts +1 -1
- package/build/types/integrations/postgresjs.d.ts.map +1 -1
- package/build/types/integrations/rewriteframes.d.ts +1 -1
- package/build/types/integrations/rewriteframes.d.ts.map +1 -1
- package/build/types/integrations/supabase.d.ts +14 -3
- package/build/types/integrations/supabase.d.ts.map +1 -1
- package/build/types/integrations/third-party-errors-filter.d.ts.map +1 -1
- package/build/types/integrations/zoderrors.d.ts +1 -1
- package/build/types/integrations/zoderrors.d.ts.map +1 -1
- package/build/types/logs/console-integration.d.ts +1 -1
- package/build/types/logs/console-integration.d.ts.map +1 -1
- package/build/types/logs/constants.d.ts +1 -1
- package/build/types/logs/constants.d.ts.map +1 -1
- package/build/types/logs/envelope.d.ts +4 -4
- package/build/types/logs/envelope.d.ts.map +1 -1
- package/build/types/logs/internal.d.ts +16 -1
- package/build/types/logs/internal.d.ts.map +1 -1
- package/build/types/logs/public-api.d.ts +2 -2
- package/build/types/logs/public-api.d.ts.map +1 -1
- package/build/types/metadata.d.ts +2 -2
- package/build/types/metadata.d.ts.map +1 -1
- package/build/types/metrics/envelope.d.ts +4 -4
- package/build/types/metrics/envelope.d.ts.map +1 -1
- package/build/types/metrics/internal.d.ts +1 -1
- package/build/types/metrics/internal.d.ts.map +1 -1
- package/build/types/metrics/public-api.d.ts +1 -1
- package/build/types/metrics/public-api.d.ts.map +1 -1
- package/build/types/profiling.d.ts +1 -1
- package/build/types/profiling.d.ts.map +1 -1
- package/build/types/report-dialog.d.ts +1 -1
- package/build/types/report-dialog.d.ts.map +1 -1
- package/build/types/scope.d.ts +14 -14
- package/build/types/scope.d.ts.map +1 -1
- package/build/types/sdk.d.ts +1 -1
- package/build/types/sdk.d.ts.map +1 -1
- package/build/types/semanticAttributes.d.ts +2 -0
- package/build/types/semanticAttributes.d.ts.map +1 -1
- package/build/types/server-exports.d.ts +3 -1
- package/build/types/server-exports.d.ts.map +1 -1
- package/build/types/server-runtime-client.d.ts +6 -6
- package/build/types/server-runtime-client.d.ts.map +1 -1
- package/build/types/session.d.ts +1 -1
- package/build/types/session.d.ts.map +1 -1
- package/build/types/shared-exports.d.ts +58 -53
- package/build/types/shared-exports.d.ts.map +1 -1
- package/build/types/tracing/ai/utils.d.ts +1 -1
- package/build/types/tracing/ai/utils.d.ts.map +1 -1
- package/build/types/tracing/anthropic-ai/streaming.d.ts +1 -1
- package/build/types/tracing/anthropic-ai/streaming.d.ts.map +1 -1
- package/build/types/tracing/anthropic-ai/utils.d.ts +2 -2
- package/build/types/tracing/anthropic-ai/utils.d.ts.map +1 -1
- package/build/types/tracing/dynamicSamplingContext.d.ts +2 -2
- package/build/types/tracing/dynamicSamplingContext.d.ts.map +1 -1
- package/build/types/tracing/google-genai/streaming.d.ts +1 -1
- package/build/types/tracing/google-genai/streaming.d.ts.map +1 -1
- package/build/types/tracing/idleSpan.d.ts +2 -2
- package/build/types/tracing/idleSpan.d.ts.map +1 -1
- package/build/types/tracing/langchain/utils.d.ts +6 -1
- package/build/types/tracing/langchain/utils.d.ts.map +1 -1
- package/build/types/tracing/langgraph/index.d.ts.map +1 -1
- package/build/types/tracing/langgraph/utils.d.ts +1 -3
- package/build/types/tracing/langgraph/utils.d.ts.map +1 -1
- package/build/types/tracing/logSpans.d.ts +1 -1
- package/build/types/tracing/logSpans.d.ts.map +1 -1
- package/build/types/tracing/measurement.d.ts +2 -2
- package/build/types/tracing/measurement.d.ts.map +1 -1
- package/build/types/tracing/openai/streaming.d.ts +1 -1
- package/build/types/tracing/openai/streaming.d.ts.map +1 -1
- package/build/types/tracing/openai/utils.d.ts +1 -1
- package/build/types/tracing/openai/utils.d.ts.map +1 -1
- package/build/types/tracing/sampling.d.ts +2 -2
- package/build/types/tracing/sampling.d.ts.map +1 -1
- package/build/types/tracing/sentryNonRecordingSpan.d.ts +3 -3
- package/build/types/tracing/sentryNonRecordingSpan.d.ts.map +1 -1
- package/build/types/tracing/sentrySpan.d.ts +4 -4
- package/build/types/tracing/sentrySpan.d.ts.map +1 -1
- package/build/types/tracing/spans/beforeSendSpan.d.ts +3 -3
- package/build/types/tracing/spans/beforeSendSpan.d.ts.map +1 -1
- package/build/types/tracing/spans/captureSpan.d.ts +1 -1
- package/build/types/tracing/spans/captureSpan.d.ts.map +1 -1
- package/build/types/tracing/spans/envelope.d.ts +2 -2
- package/build/types/tracing/spans/envelope.d.ts.map +1 -1
- package/build/types/tracing/spans/estimateSize.d.ts +1 -1
- package/build/types/tracing/spans/estimateSize.d.ts.map +1 -1
- package/build/types/tracing/spans/extractGenAiSpans.d.ts +2 -2
- package/build/types/tracing/spans/extractGenAiSpans.d.ts.map +1 -1
- package/build/types/tracing/spans/scopeContextAttributes.d.ts +9 -0
- package/build/types/tracing/spans/scopeContextAttributes.d.ts.map +1 -0
- package/build/types/tracing/spans/spanJsonToStreamedSpan.d.ts +1 -1
- package/build/types/tracing/spans/spanJsonToStreamedSpan.d.ts.map +1 -1
- package/build/types/tracing/spanstatus.d.ts +2 -2
- package/build/types/tracing/spanstatus.d.ts.map +1 -1
- package/build/types/tracing/trace.d.ts +2 -2
- package/build/types/tracing/trace.d.ts.map +1 -1
- package/build/types/tracing/utils.d.ts +1 -1
- package/build/types/tracing/utils.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 +1 -1
- package/build/types/transports/base.d.ts.map +1 -1
- package/build/types/transports/multiplexed.d.ts +3 -3
- package/build/types/transports/multiplexed.d.ts.map +1 -1
- package/build/types/transports/offline.d.ts +2 -2
- package/build/types/transports/offline.d.ts.map +1 -1
- package/build/types/transports/userAgent.d.ts +1 -1
- package/build/types/transports/userAgent.d.ts.map +1 -1
- package/build/types/trpc.d.ts.map +1 -1
- package/build/types/types/attachment.d.ts.map +1 -0
- package/build/types/types/breadcrumb.d.ts.map +1 -0
- package/build/types/types/browseroptions.d.ts.map +1 -0
- package/build/types/types/checkin.d.ts.map +1 -0
- package/build/types/types/clientreport.d.ts.map +1 -0
- package/build/types/types/context.d.ts.map +1 -0
- package/build/types/types/csp.d.ts.map +1 -0
- package/build/types/types/datacategory.d.ts.map +1 -0
- package/build/types/types/datacollection.d.ts +75 -0
- package/build/types/types/datacollection.d.ts.map +1 -0
- package/build/types/types/debugMeta.d.ts.map +1 -0
- package/build/types/types/dsn.d.ts.map +1 -0
- package/build/types/types/envelope.d.ts.map +1 -0
- package/build/types/types/error.d.ts.map +1 -0
- package/build/types/types/event.d.ts.map +1 -0
- package/build/types/types/eventprocessor.d.ts.map +1 -0
- package/build/types/types/exception.d.ts.map +1 -0
- package/build/types/types/extra.d.ts.map +1 -0
- package/build/types/types/feedback/config.d.ts.map +1 -0
- package/build/types/types/feedback/form.d.ts.map +1 -0
- package/build/types/types/feedback/index.d.ts.map +1 -0
- package/build/types/types/feedback/sendFeedback.d.ts.map +1 -0
- package/build/types/types/feedback/theme.d.ts.map +1 -0
- package/build/types/types/instrument.d.ts.map +1 -0
- package/build/types/types/integration.d.ts.map +1 -0
- package/build/types/types/link.d.ts.map +1 -0
- package/build/types/types/log.d.ts.map +1 -0
- package/build/types/types/measurement.d.ts.map +1 -0
- package/build/types/types/mechanism.d.ts.map +1 -0
- package/build/types/types/metric.d.ts.map +1 -0
- package/build/types/types/misc.d.ts.map +1 -0
- package/build/types/types/opentelemetry.d.ts.map +1 -0
- package/build/types/{types-hoist → types}/options.d.ts +17 -0
- package/build/types/types/options.d.ts.map +1 -0
- package/build/types/types/package.d.ts.map +1 -0
- package/build/types/types/parameterize.d.ts.map +1 -0
- package/build/types/types/polymorphics.d.ts.map +1 -0
- package/build/types/types/profiling.d.ts.map +1 -0
- package/build/types/types/replay.d.ts.map +1 -0
- package/build/types/types/request.d.ts.map +1 -0
- package/build/types/types/runtime.d.ts.map +1 -0
- package/build/types/{types-hoist → types}/samplingcontext.d.ts +1 -1
- package/build/types/types/samplingcontext.d.ts.map +1 -0
- package/build/types/types/sdkinfo.d.ts.map +1 -0
- package/build/types/types/sdkmetadata.d.ts.map +1 -0
- package/build/types/types/session.d.ts.map +1 -0
- package/build/types/types/severity.d.ts.map +1 -0
- package/build/types/types/span.d.ts.map +1 -0
- package/build/types/types/spanStatus.d.ts.map +1 -0
- package/build/types/types/stackframe.d.ts.map +1 -0
- package/build/types/types/stacktrace.d.ts.map +1 -0
- package/build/types/{types-hoist → types}/startSpanOptions.d.ts +13 -0
- package/build/types/types/startSpanOptions.d.ts.map +1 -0
- package/build/types/types/thread.d.ts.map +1 -0
- package/build/types/types/timedEvent.d.ts.map +1 -0
- package/build/types/types/tracing.d.ts.map +1 -0
- package/build/types/types/transaction.d.ts.map +1 -0
- package/build/types/types/transport.d.ts.map +1 -0
- package/build/types/types/user.d.ts.map +1 -0
- package/build/types/types/view-hierarchy.d.ts.map +1 -0
- package/build/types/types/vue.d.ts.map +1 -0
- package/build/types/types/webfetchapi.d.ts.map +1 -0
- package/build/types/types/wrappedfunction.d.ts.map +1 -0
- package/build/types/utils/aggregate-errors.d.ts +3 -3
- package/build/types/utils/aggregate-errors.d.ts.map +1 -1
- package/build/types/utils/anr.d.ts +1 -1
- package/build/types/utils/anr.d.ts.map +1 -1
- package/build/types/utils/baggage.d.ts +1 -1
- package/build/types/utils/baggage.d.ts.map +1 -1
- package/build/types/utils/breadcrumb-log-level.d.ts +1 -1
- package/build/types/utils/breadcrumb-log-level.d.ts.map +1 -1
- package/build/types/utils/clientreport.d.ts +2 -2
- package/build/types/utils/clientreport.d.ts.map +1 -1
- package/build/types/utils/data-collection/defaultPiiToCollectionOptions.d.ts +6 -0
- package/build/types/utils/data-collection/defaultPiiToCollectionOptions.d.ts.map +1 -0
- package/build/types/utils/data-collection/filterCookies.d.ts +9 -0
- package/build/types/utils/data-collection/filterCookies.d.ts.map +1 -0
- package/build/types/utils/data-collection/filterKeyValueData.d.ts +11 -0
- package/build/types/utils/data-collection/filterKeyValueData.d.ts.map +1 -0
- package/build/types/utils/data-collection/filterQueryParams.d.ts +9 -0
- package/build/types/utils/data-collection/filterQueryParams.d.ts.map +1 -0
- package/build/types/utils/data-collection/filtering-snippets.d.ts +14 -0
- package/build/types/utils/data-collection/filtering-snippets.d.ts.map +1 -0
- package/build/types/utils/data-collection/resolveDataCollectionOptions.d.ts +14 -0
- package/build/types/utils/data-collection/resolveDataCollectionOptions.d.ts.map +1 -0
- package/build/types/utils/debug-ids.d.ts +2 -2
- package/build/types/utils/debug-ids.d.ts.map +1 -1
- package/build/types/utils/debug-logger.d.ts +1 -1
- package/build/types/utils/debug-logger.d.ts.map +1 -1
- package/build/types/utils/dsn.d.ts +1 -1
- package/build/types/utils/dsn.d.ts.map +1 -1
- package/build/types/utils/env.d.ts.map +1 -1
- package/build/types/utils/envelope.d.ts +8 -8
- package/build/types/utils/envelope.d.ts.map +1 -1
- package/build/types/utils/error.d.ts +1 -1
- package/build/types/utils/error.d.ts.map +1 -1
- package/build/types/utils/eventUtils.d.ts +1 -1
- package/build/types/utils/eventUtils.d.ts.map +1 -1
- package/build/types/utils/eventbuilder.d.ts +6 -6
- package/build/types/utils/eventbuilder.d.ts.map +1 -1
- package/build/types/utils/featureFlags.d.ts +1 -1
- package/build/types/utils/featureFlags.d.ts.map +1 -1
- package/build/types/utils/hasSpansEnabled.d.ts +1 -1
- package/build/types/utils/hasSpansEnabled.d.ts.map +1 -1
- package/build/types/utils/ipAddress.d.ts +2 -2
- package/build/types/utils/ipAddress.d.ts.map +1 -1
- package/build/types/utils/is.d.ts +4 -4
- package/build/types/utils/is.d.ts.map +1 -1
- package/build/types/utils/meta.d.ts +1 -1
- package/build/types/utils/meta.d.ts.map +1 -1
- package/build/types/utils/misc.d.ts +3 -3
- package/build/types/utils/misc.d.ts.map +1 -1
- package/build/types/utils/node-stack-trace.d.ts +1 -1
- package/build/types/utils/node-stack-trace.d.ts.map +1 -1
- package/build/types/utils/object.d.ts +1 -1
- package/build/types/utils/object.d.ts.map +1 -1
- package/build/types/utils/parameterize.d.ts +1 -1
- package/build/types/utils/parameterize.d.ts.map +1 -1
- package/build/types/utils/prepareEvent.d.ts +3 -3
- package/build/types/utils/prepareEvent.d.ts.map +1 -1
- package/build/types/utils/ratelimit.d.ts +2 -2
- package/build/types/utils/ratelimit.d.ts.map +1 -1
- package/build/types/utils/request.d.ts +3 -3
- package/build/types/utils/request.d.ts.map +1 -1
- package/build/types/utils/scopeData.d.ts +1 -1
- package/build/types/utils/scopeData.d.ts.map +1 -1
- package/build/types/utils/sdkMetadata.d.ts +1 -1
- package/build/types/utils/sdkMetadata.d.ts.map +1 -1
- package/build/types/utils/severity.d.ts +1 -1
- package/build/types/utils/severity.d.ts.map +1 -1
- package/build/types/utils/should-ignore-span.d.ts +2 -2
- package/build/types/utils/should-ignore-span.d.ts.map +1 -1
- package/build/types/utils/spanOnScope.d.ts +1 -1
- package/build/types/utils/spanOnScope.d.ts.map +1 -1
- package/build/types/utils/spanUtils.d.ts +4 -4
- package/build/types/utils/spanUtils.d.ts.map +1 -1
- package/build/types/utils/stacktrace.d.ts +4 -4
- package/build/types/utils/stacktrace.d.ts.map +1 -1
- package/build/types/utils/trace-info.d.ts +2 -2
- package/build/types/utils/trace-info.d.ts.map +1 -1
- package/build/types/utils/traceData.d.ts +2 -2
- package/build/types/utils/traceData.d.ts.map +1 -1
- package/build/types/utils/tracePropagationTargets.d.ts +1 -1
- package/build/types/utils/tracePropagationTargets.d.ts.map +1 -1
- package/build/types/utils/tracing.d.ts +2 -2
- package/build/types/utils/tracing.d.ts.map +1 -1
- package/build/types/utils/transactionEvent.d.ts +2 -2
- package/build/types/utils/transactionEvent.d.ts.map +1 -1
- package/build/types/utils/url.d.ts +1 -1
- package/build/types/utils/url.d.ts.map +1 -1
- package/build/types/utils/worldwide.d.ts +1 -0
- package/build/types/utils/worldwide.d.ts.map +1 -1
- package/build/types-ts3.8/api.d.ts +2 -2
- package/build/types-ts3.8/attributes.d.ts +5 -8
- package/build/types-ts3.8/breadcrumbs.d.ts +1 -1
- package/build/types-ts3.8/browser-exports.d.ts +3 -3
- package/build/types-ts3.8/carrier.d.ts +2 -2
- package/build/types-ts3.8/checkin.d.ts +4 -4
- package/build/types-ts3.8/client.d.ts +32 -22
- package/build/types-ts3.8/currentScopes.d.ts +1 -1
- package/build/types-ts3.8/envelope.d.ts +7 -7
- package/build/types-ts3.8/eventProcessors.d.ts +2 -2
- package/build/types-ts3.8/exports.d.ts +8 -8
- package/build/types-ts3.8/feedback.d.ts +2 -2
- package/build/types-ts3.8/fetch.d.ts +3 -3
- package/build/types-ts3.8/instrument/console.d.ts +1 -1
- package/build/types-ts3.8/instrument/fetch.d.ts +1 -1
- package/build/types-ts3.8/instrument/globalError.d.ts +1 -1
- package/build/types-ts3.8/instrument/globalUnhandledRejection.d.ts +1 -1
- package/build/types-ts3.8/integration.d.ts +2 -2
- package/build/types-ts3.8/integrations/consola.d.ts +1 -1
- package/build/types-ts3.8/integrations/console.d.ts +1 -1
- package/build/types-ts3.8/integrations/dedupe.d.ts +1 -1
- package/build/types-ts3.8/integrations/express/types.d.ts +2 -2
- package/build/types-ts3.8/integrations/express/utils.d.ts +1 -1
- package/build/types-ts3.8/integrations/featureFlags/featureFlagsIntegration.d.ts +1 -1
- package/build/types-ts3.8/integrations/featureFlags/growthbook.d.ts +1 -1
- package/build/types-ts3.8/integrations/http/double-wrap-warning.d.ts +1 -1
- package/build/types-ts3.8/integrations/http/get-outgoing-span-data.d.ts +2 -2
- package/build/types-ts3.8/integrations/http/patch-request-to-capture-body.d.ts +12 -0
- package/build/types-ts3.8/integrations/http/record-request-session.d.ts +18 -0
- package/build/types-ts3.8/integrations/http/server-subscription.d.ts +26 -0
- package/build/types-ts3.8/integrations/http/types.d.ts +12 -6
- package/build/types-ts3.8/integrations/mcp-server/correlation.d.ts +1 -1
- package/build/types-ts3.8/integrations/mcp-server/piiFiltering.d.ts +1 -1
- package/build/types-ts3.8/integrations/mcp-server/types.d.ts +1 -1
- package/build/types-ts3.8/integrations/postgresjs.d.ts +1 -1
- package/build/types-ts3.8/integrations/rewriteframes.d.ts +1 -1
- package/build/types-ts3.8/integrations/supabase.d.ts +14 -3
- package/build/types-ts3.8/integrations/zoderrors.d.ts +1 -1
- package/build/types-ts3.8/logs/console-integration.d.ts +1 -1
- package/build/types-ts3.8/logs/constants.d.ts +1 -1
- package/build/types-ts3.8/logs/envelope.d.ts +4 -4
- package/build/types-ts3.8/logs/internal.d.ts +16 -1
- package/build/types-ts3.8/logs/public-api.d.ts +2 -2
- package/build/types-ts3.8/metadata.d.ts +2 -2
- package/build/types-ts3.8/metrics/envelope.d.ts +4 -4
- package/build/types-ts3.8/metrics/internal.d.ts +1 -1
- package/build/types-ts3.8/metrics/public-api.d.ts +1 -1
- package/build/types-ts3.8/profiling.d.ts +1 -1
- package/build/types-ts3.8/report-dialog.d.ts +1 -1
- package/build/types-ts3.8/scope.d.ts +14 -14
- package/build/types-ts3.8/sdk.d.ts +1 -1
- package/build/types-ts3.8/semanticAttributes.d.ts +2 -0
- package/build/types-ts3.8/server-exports.d.ts +3 -1
- package/build/types-ts3.8/server-runtime-client.d.ts +6 -6
- package/build/types-ts3.8/session.d.ts +1 -1
- package/build/types-ts3.8/shared-exports.d.ts +58 -53
- package/build/types-ts3.8/tracing/ai/utils.d.ts +1 -1
- package/build/types-ts3.8/tracing/anthropic-ai/streaming.d.ts +1 -1
- package/build/types-ts3.8/tracing/anthropic-ai/utils.d.ts +2 -2
- package/build/types-ts3.8/tracing/dynamicSamplingContext.d.ts +2 -2
- package/build/types-ts3.8/tracing/google-genai/streaming.d.ts +1 -1
- package/build/types-ts3.8/tracing/idleSpan.d.ts +2 -2
- package/build/types-ts3.8/tracing/langchain/utils.d.ts +6 -1
- package/build/types-ts3.8/tracing/langgraph/utils.d.ts +1 -3
- package/build/types-ts3.8/tracing/logSpans.d.ts +1 -1
- package/build/types-ts3.8/tracing/measurement.d.ts +2 -2
- package/build/types-ts3.8/tracing/openai/streaming.d.ts +1 -1
- package/build/types-ts3.8/tracing/openai/utils.d.ts +1 -1
- package/build/types-ts3.8/tracing/sampling.d.ts +2 -2
- package/build/types-ts3.8/tracing/sentryNonRecordingSpan.d.ts +3 -3
- package/build/types-ts3.8/tracing/sentrySpan.d.ts +4 -4
- package/build/types-ts3.8/tracing/spans/beforeSendSpan.d.ts +3 -3
- package/build/types-ts3.8/tracing/spans/captureSpan.d.ts +1 -1
- package/build/types-ts3.8/tracing/spans/envelope.d.ts +2 -2
- package/build/types-ts3.8/tracing/spans/estimateSize.d.ts +1 -1
- package/build/types-ts3.8/tracing/spans/extractGenAiSpans.d.ts +2 -2
- package/build/types-ts3.8/tracing/spans/scopeContextAttributes.d.ts +9 -0
- package/build/types-ts3.8/tracing/spans/spanJsonToStreamedSpan.d.ts +1 -1
- package/build/types-ts3.8/tracing/spanstatus.d.ts +2 -2
- package/build/types-ts3.8/tracing/trace.d.ts +2 -2
- package/build/types-ts3.8/tracing/utils.d.ts +1 -1
- package/build/types-ts3.8/tracing/vercel-ai/utils.d.ts +2 -2
- package/build/types-ts3.8/transports/base.d.ts +1 -1
- package/build/types-ts3.8/transports/multiplexed.d.ts +3 -3
- package/build/types-ts3.8/transports/offline.d.ts +2 -2
- package/build/types-ts3.8/transports/userAgent.d.ts +1 -1
- package/build/types-ts3.8/types/datacollection.d.ts +75 -0
- package/build/types-ts3.8/{types-hoist → types}/options.d.ts +17 -0
- package/build/types-ts3.8/{types-hoist → types}/samplingcontext.d.ts +1 -1
- package/build/types-ts3.8/{types-hoist → types}/startSpanOptions.d.ts +13 -0
- package/build/types-ts3.8/utils/aggregate-errors.d.ts +3 -3
- package/build/types-ts3.8/utils/anr.d.ts +1 -1
- package/build/types-ts3.8/utils/baggage.d.ts +1 -1
- package/build/types-ts3.8/utils/breadcrumb-log-level.d.ts +1 -1
- package/build/types-ts3.8/utils/clientreport.d.ts +2 -2
- package/build/types-ts3.8/utils/data-collection/defaultPiiToCollectionOptions.d.ts +6 -0
- package/build/types-ts3.8/utils/data-collection/filterCookies.d.ts +9 -0
- package/build/types-ts3.8/utils/data-collection/filterKeyValueData.d.ts +11 -0
- package/build/types-ts3.8/utils/data-collection/filterQueryParams.d.ts +9 -0
- package/build/types-ts3.8/utils/data-collection/filtering-snippets.d.ts +14 -0
- package/build/types-ts3.8/utils/data-collection/resolveDataCollectionOptions.d.ts +14 -0
- package/build/types-ts3.8/utils/debug-ids.d.ts +2 -2
- package/build/types-ts3.8/utils/debug-logger.d.ts +1 -1
- package/build/types-ts3.8/utils/dsn.d.ts +1 -1
- package/build/types-ts3.8/utils/envelope.d.ts +8 -8
- package/build/types-ts3.8/utils/error.d.ts +1 -1
- package/build/types-ts3.8/utils/eventUtils.d.ts +1 -1
- package/build/types-ts3.8/utils/eventbuilder.d.ts +6 -6
- package/build/types-ts3.8/utils/featureFlags.d.ts +1 -1
- package/build/types-ts3.8/utils/hasSpansEnabled.d.ts +1 -1
- package/build/types-ts3.8/utils/ipAddress.d.ts +2 -2
- package/build/types-ts3.8/utils/is.d.ts +4 -4
- package/build/types-ts3.8/utils/meta.d.ts +1 -1
- package/build/types-ts3.8/utils/misc.d.ts +3 -3
- package/build/types-ts3.8/utils/node-stack-trace.d.ts +1 -1
- package/build/types-ts3.8/utils/object.d.ts +1 -1
- package/build/types-ts3.8/utils/parameterize.d.ts +1 -1
- package/build/types-ts3.8/utils/prepareEvent.d.ts +3 -3
- package/build/types-ts3.8/utils/ratelimit.d.ts +2 -2
- package/build/types-ts3.8/utils/request.d.ts +3 -3
- package/build/types-ts3.8/utils/scopeData.d.ts +1 -1
- package/build/types-ts3.8/utils/sdkMetadata.d.ts +1 -1
- package/build/types-ts3.8/utils/severity.d.ts +1 -1
- package/build/types-ts3.8/utils/should-ignore-span.d.ts +2 -2
- package/build/types-ts3.8/utils/spanOnScope.d.ts +1 -1
- package/build/types-ts3.8/utils/spanUtils.d.ts +4 -4
- package/build/types-ts3.8/utils/stacktrace.d.ts +4 -4
- package/build/types-ts3.8/utils/trace-info.d.ts +2 -2
- package/build/types-ts3.8/utils/traceData.d.ts +2 -2
- package/build/types-ts3.8/utils/tracePropagationTargets.d.ts +1 -1
- package/build/types-ts3.8/utils/tracing.d.ts +2 -2
- package/build/types-ts3.8/utils/transactionEvent.d.ts +2 -2
- package/build/types-ts3.8/utils/url.d.ts +1 -1
- package/build/types-ts3.8/utils/worldwide.d.ts +1 -0
- package/package.json +1 -1
- package/build/types/types-hoist/attachment.d.ts.map +0 -1
- package/build/types/types-hoist/breadcrumb.d.ts.map +0 -1
- package/build/types/types-hoist/browseroptions.d.ts.map +0 -1
- package/build/types/types-hoist/checkin.d.ts.map +0 -1
- package/build/types/types-hoist/clientreport.d.ts.map +0 -1
- package/build/types/types-hoist/context.d.ts.map +0 -1
- package/build/types/types-hoist/csp.d.ts.map +0 -1
- package/build/types/types-hoist/datacategory.d.ts.map +0 -1
- package/build/types/types-hoist/debugMeta.d.ts.map +0 -1
- package/build/types/types-hoist/dsn.d.ts.map +0 -1
- package/build/types/types-hoist/envelope.d.ts.map +0 -1
- package/build/types/types-hoist/error.d.ts.map +0 -1
- package/build/types/types-hoist/event.d.ts.map +0 -1
- package/build/types/types-hoist/eventprocessor.d.ts.map +0 -1
- package/build/types/types-hoist/exception.d.ts.map +0 -1
- package/build/types/types-hoist/extra.d.ts.map +0 -1
- package/build/types/types-hoist/feedback/config.d.ts.map +0 -1
- package/build/types/types-hoist/feedback/form.d.ts.map +0 -1
- package/build/types/types-hoist/feedback/index.d.ts.map +0 -1
- package/build/types/types-hoist/feedback/sendFeedback.d.ts.map +0 -1
- package/build/types/types-hoist/feedback/theme.d.ts.map +0 -1
- package/build/types/types-hoist/instrument.d.ts.map +0 -1
- package/build/types/types-hoist/integration.d.ts.map +0 -1
- package/build/types/types-hoist/link.d.ts.map +0 -1
- package/build/types/types-hoist/log.d.ts.map +0 -1
- package/build/types/types-hoist/measurement.d.ts.map +0 -1
- package/build/types/types-hoist/mechanism.d.ts.map +0 -1
- package/build/types/types-hoist/metric.d.ts.map +0 -1
- package/build/types/types-hoist/misc.d.ts.map +0 -1
- package/build/types/types-hoist/opentelemetry.d.ts.map +0 -1
- package/build/types/types-hoist/options.d.ts.map +0 -1
- package/build/types/types-hoist/package.d.ts.map +0 -1
- package/build/types/types-hoist/parameterize.d.ts.map +0 -1
- package/build/types/types-hoist/polymorphics.d.ts.map +0 -1
- package/build/types/types-hoist/profiling.d.ts.map +0 -1
- package/build/types/types-hoist/replay.d.ts.map +0 -1
- package/build/types/types-hoist/request.d.ts.map +0 -1
- package/build/types/types-hoist/runtime.d.ts.map +0 -1
- package/build/types/types-hoist/samplingcontext.d.ts.map +0 -1
- package/build/types/types-hoist/sdkinfo.d.ts.map +0 -1
- package/build/types/types-hoist/sdkmetadata.d.ts.map +0 -1
- package/build/types/types-hoist/session.d.ts.map +0 -1
- package/build/types/types-hoist/severity.d.ts.map +0 -1
- package/build/types/types-hoist/span.d.ts.map +0 -1
- package/build/types/types-hoist/spanStatus.d.ts.map +0 -1
- package/build/types/types-hoist/stackframe.d.ts.map +0 -1
- package/build/types/types-hoist/stacktrace.d.ts.map +0 -1
- package/build/types/types-hoist/startSpanOptions.d.ts.map +0 -1
- package/build/types/types-hoist/thread.d.ts.map +0 -1
- package/build/types/types-hoist/timedEvent.d.ts.map +0 -1
- package/build/types/types-hoist/tracing.d.ts.map +0 -1
- package/build/types/types-hoist/transaction.d.ts.map +0 -1
- package/build/types/types-hoist/transport.d.ts.map +0 -1
- package/build/types/types-hoist/user.d.ts.map +0 -1
- package/build/types/types-hoist/view-hierarchy.d.ts.map +0 -1
- package/build/types/types-hoist/vue.d.ts.map +0 -1
- package/build/types/types-hoist/webfetchapi.d.ts.map +0 -1
- package/build/types/types-hoist/wrappedfunction.d.ts.map +0 -1
- /package/build/types/{types-hoist → types}/attachment.d.ts +0 -0
- /package/build/types/{types-hoist → types}/breadcrumb.d.ts +0 -0
- /package/build/types/{types-hoist → types}/browseroptions.d.ts +0 -0
- /package/build/types/{types-hoist → types}/checkin.d.ts +0 -0
- /package/build/types/{types-hoist → types}/clientreport.d.ts +0 -0
- /package/build/types/{types-hoist → types}/context.d.ts +0 -0
- /package/build/types/{types-hoist → types}/csp.d.ts +0 -0
- /package/build/types/{types-hoist → types}/datacategory.d.ts +0 -0
- /package/build/types/{types-hoist → types}/debugMeta.d.ts +0 -0
- /package/build/types/{types-hoist → types}/dsn.d.ts +0 -0
- /package/build/types/{types-hoist → types}/envelope.d.ts +0 -0
- /package/build/types/{types-hoist → types}/error.d.ts +0 -0
- /package/build/types/{types-hoist → types}/event.d.ts +0 -0
- /package/build/types/{types-hoist → types}/eventprocessor.d.ts +0 -0
- /package/build/types/{types-hoist → types}/exception.d.ts +0 -0
- /package/build/types/{types-hoist → types}/extra.d.ts +0 -0
- /package/build/types/{types-hoist → types}/feedback/config.d.ts +0 -0
- /package/build/types/{types-hoist → types}/feedback/form.d.ts +0 -0
- /package/build/types/{types-hoist → types}/feedback/index.d.ts +0 -0
- /package/build/types/{types-hoist → types}/feedback/sendFeedback.d.ts +0 -0
- /package/build/types/{types-hoist → types}/feedback/theme.d.ts +0 -0
- /package/build/types/{types-hoist → types}/instrument.d.ts +0 -0
- /package/build/types/{types-hoist → types}/integration.d.ts +0 -0
- /package/build/types/{types-hoist → types}/link.d.ts +0 -0
- /package/build/types/{types-hoist → types}/log.d.ts +0 -0
- /package/build/types/{types-hoist → types}/measurement.d.ts +0 -0
- /package/build/types/{types-hoist → types}/mechanism.d.ts +0 -0
- /package/build/types/{types-hoist → types}/metric.d.ts +0 -0
- /package/build/types/{types-hoist → types}/misc.d.ts +0 -0
- /package/build/types/{types-hoist → types}/opentelemetry.d.ts +0 -0
- /package/build/types/{types-hoist → types}/package.d.ts +0 -0
- /package/build/types/{types-hoist → types}/parameterize.d.ts +0 -0
- /package/build/types/{types-hoist → types}/polymorphics.d.ts +0 -0
- /package/build/types/{types-hoist → types}/profiling.d.ts +0 -0
- /package/build/types/{types-hoist → types}/replay.d.ts +0 -0
- /package/build/types/{types-hoist → types}/request.d.ts +0 -0
- /package/build/types/{types-hoist → types}/runtime.d.ts +0 -0
- /package/build/types/{types-hoist → types}/sdkinfo.d.ts +0 -0
- /package/build/types/{types-hoist → types}/sdkmetadata.d.ts +0 -0
- /package/build/types/{types-hoist → types}/session.d.ts +0 -0
- /package/build/types/{types-hoist → types}/severity.d.ts +0 -0
- /package/build/types/{types-hoist → types}/span.d.ts +0 -0
- /package/build/types/{types-hoist → types}/spanStatus.d.ts +0 -0
- /package/build/types/{types-hoist → types}/stackframe.d.ts +0 -0
- /package/build/types/{types-hoist → types}/stacktrace.d.ts +0 -0
- /package/build/types/{types-hoist → types}/thread.d.ts +0 -0
- /package/build/types/{types-hoist → types}/timedEvent.d.ts +0 -0
- /package/build/types/{types-hoist → types}/tracing.d.ts +0 -0
- /package/build/types/{types-hoist → types}/transaction.d.ts +0 -0
- /package/build/types/{types-hoist → types}/transport.d.ts +0 -0
- /package/build/types/{types-hoist → types}/user.d.ts +0 -0
- /package/build/types/{types-hoist → types}/view-hierarchy.d.ts +0 -0
- /package/build/types/{types-hoist → types}/vue.d.ts +0 -0
- /package/build/types/{types-hoist → types}/webfetchapi.d.ts +0 -0
- /package/build/types/{types-hoist → types}/wrappedfunction.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/attachment.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/breadcrumb.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/browseroptions.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/checkin.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/clientreport.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/context.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/csp.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/datacategory.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/debugMeta.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/dsn.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/envelope.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/error.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/event.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/eventprocessor.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/exception.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/extra.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/feedback/config.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/feedback/form.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/feedback/index.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/feedback/sendFeedback.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/feedback/theme.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/instrument.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/integration.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/link.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/log.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/measurement.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/mechanism.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/metric.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/misc.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/opentelemetry.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/package.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/parameterize.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/polymorphics.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/profiling.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/replay.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/request.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/runtime.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/sdkinfo.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/sdkmetadata.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/session.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/severity.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/span.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/spanStatus.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/stackframe.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/stacktrace.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/thread.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/timedEvent.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/tracing.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/transaction.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/transport.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/user.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/view-hierarchy.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/vue.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/webfetchapi.d.ts +0 -0
- /package/build/types-ts3.8/{types-hoist → types}/wrappedfunction.d.ts +0 -0
|
@@ -14,21 +14,12 @@ const tracing = require('./tracing.js');
|
|
|
14
14
|
const debugLogger = require('./debug-logger.js');
|
|
15
15
|
const spanOnScope = require('./spanOnScope.js');
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
const TRACE_FLAG_SAMPLED = 0x1;
|
|
20
|
-
|
|
17
|
+
const TRACE_FLAG_NONE = 0;
|
|
18
|
+
const TRACE_FLAG_SAMPLED = 1;
|
|
21
19
|
let hasShownSpanDropWarning = false;
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Convert a span to a trace context, which can be sent as the `trace` context in an event.
|
|
25
|
-
* By default, this will only include trace_id, span_id & parent_span_id.
|
|
26
|
-
* If `includeAllData` is true, it will also include data, op, status & origin.
|
|
27
|
-
*/
|
|
28
20
|
function spanToTransactionTraceContext(span) {
|
|
29
21
|
const { spanId: span_id, traceId: trace_id } = span.spanContext();
|
|
30
22
|
const { data, op, parent_span_id, status, origin, links } = spanToJSON(span);
|
|
31
|
-
|
|
32
23
|
return {
|
|
33
24
|
parent_span_id,
|
|
34
25
|
span_id,
|
|
@@ -37,53 +28,30 @@ function spanToTransactionTraceContext(span) {
|
|
|
37
28
|
op,
|
|
38
29
|
status,
|
|
39
30
|
origin,
|
|
40
|
-
links
|
|
31
|
+
links
|
|
41
32
|
};
|
|
42
33
|
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Convert a span to a trace context, which can be sent as the `trace` context in a non-transaction event.
|
|
46
|
-
*/
|
|
47
34
|
function spanToTraceContext(span) {
|
|
48
35
|
const { spanId, traceId: trace_id, isRemote } = span.spanContext();
|
|
49
|
-
|
|
50
|
-
// If the span is remote, we use a random/virtual span as span_id to the trace context,
|
|
51
|
-
// and the remote span as parent_span_id
|
|
52
36
|
const parent_span_id = isRemote ? spanId : spanToJSON(span).parent_span_id;
|
|
53
37
|
const scope = utils.getCapturedScopesOnSpan(span).scope;
|
|
54
|
-
|
|
55
38
|
const span_id = isRemote ? scope?.getPropagationContext().propagationSpanId || propagationContext.generateSpanId() : spanId;
|
|
56
|
-
|
|
57
39
|
return {
|
|
58
40
|
parent_span_id,
|
|
59
41
|
span_id,
|
|
60
|
-
trace_id
|
|
42
|
+
trace_id
|
|
61
43
|
};
|
|
62
44
|
}
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Convert a Span to a Sentry trace header.
|
|
66
|
-
*/
|
|
67
45
|
function spanToTraceHeader(span) {
|
|
68
46
|
const { traceId, spanId } = span.spanContext();
|
|
69
47
|
const sampled = spanIsSampled(span);
|
|
70
48
|
return tracing.generateSentryTraceHeader(traceId, spanId, sampled);
|
|
71
49
|
}
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Convert a Span to a W3C traceparent header.
|
|
75
|
-
*/
|
|
76
50
|
function spanToTraceparentHeader(span) {
|
|
77
51
|
const { traceId, spanId } = span.spanContext();
|
|
78
52
|
const sampled = spanIsSampled(span);
|
|
79
53
|
return tracing.generateTraceparentHeader(traceId, spanId, sampled);
|
|
80
54
|
}
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Converts the span links array to a flattened version to be sent within an envelope.
|
|
84
|
-
*
|
|
85
|
-
* If the links array is empty, it returns `undefined` so the empty value can be dropped before it's sent.
|
|
86
|
-
*/
|
|
87
55
|
function convertSpanLinksForEnvelope(links) {
|
|
88
56
|
if (links && links.length > 0) {
|
|
89
57
|
return links.map(({ context: { spanId, traceId, traceFlags, ...restContext }, attributes }) => ({
|
|
@@ -91,78 +59,47 @@ function convertSpanLinksForEnvelope(links) {
|
|
|
91
59
|
trace_id: traceId,
|
|
92
60
|
sampled: traceFlags === TRACE_FLAG_SAMPLED,
|
|
93
61
|
attributes,
|
|
94
|
-
...restContext
|
|
62
|
+
...restContext
|
|
95
63
|
}));
|
|
96
64
|
} else {
|
|
97
|
-
return
|
|
65
|
+
return void 0;
|
|
98
66
|
}
|
|
99
67
|
}
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Converts the span links array to a flattened version with serialized attributes for V2 spans.
|
|
103
|
-
*
|
|
104
|
-
* If the links array is empty, it returns `undefined` so the empty value can be dropped before it's sent.
|
|
105
|
-
*/
|
|
106
|
-
function getStreamedSpanLinks(
|
|
107
|
-
links,
|
|
108
|
-
) {
|
|
68
|
+
function getStreamedSpanLinks(links) {
|
|
109
69
|
if (links?.length) {
|
|
110
70
|
return links.map(({ context: { spanId, traceId, traceFlags }, attributes }) => ({
|
|
111
71
|
span_id: spanId,
|
|
112
72
|
trace_id: traceId,
|
|
113
73
|
sampled: traceFlags === TRACE_FLAG_SAMPLED,
|
|
114
|
-
attributes
|
|
74
|
+
attributes
|
|
115
75
|
}));
|
|
116
76
|
} else {
|
|
117
|
-
return
|
|
77
|
+
return void 0;
|
|
118
78
|
}
|
|
119
79
|
}
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* Convert a span time input into a timestamp in seconds.
|
|
123
|
-
*/
|
|
124
80
|
function spanTimeInputToSeconds(input) {
|
|
125
|
-
if (typeof input ===
|
|
81
|
+
if (typeof input === "number") {
|
|
126
82
|
return ensureTimestampInSeconds(input);
|
|
127
83
|
}
|
|
128
|
-
|
|
129
84
|
if (Array.isArray(input)) {
|
|
130
|
-
// See {@link HrTime} for the array-based time format
|
|
131
85
|
return input[0] + input[1] / 1e9;
|
|
132
86
|
}
|
|
133
|
-
|
|
134
87
|
if (input instanceof Date) {
|
|
135
88
|
return ensureTimestampInSeconds(input.getTime());
|
|
136
89
|
}
|
|
137
|
-
|
|
138
90
|
return time.timestampInSeconds();
|
|
139
91
|
}
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Converts a timestamp to second, if it was in milliseconds, or keeps it as second.
|
|
143
|
-
*/
|
|
144
92
|
function ensureTimestampInSeconds(timestamp) {
|
|
145
93
|
const isMs = timestamp > 9999999999;
|
|
146
|
-
return isMs ? timestamp /
|
|
94
|
+
return isMs ? timestamp / 1e3 : timestamp;
|
|
147
95
|
}
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* Convert a span to a JSON representation.
|
|
151
|
-
*/
|
|
152
|
-
// Note: Because of this, we currently have a circular type dependency (which we opted out of in package.json).
|
|
153
|
-
// This is not avoidable as we need `spanToJSON` in `spanUtils.ts`, which in turn is needed by `span.ts` for backwards compatibility.
|
|
154
|
-
// And `spanToJSON` needs the Span class from `span.ts` to check here.
|
|
155
96
|
function spanToJSON(span) {
|
|
156
97
|
if (spanIsSentrySpan(span)) {
|
|
157
98
|
return span.getSpanJSON();
|
|
158
99
|
}
|
|
159
|
-
|
|
160
100
|
const { spanId: span_id, traceId: trace_id } = span.spanContext();
|
|
161
|
-
|
|
162
|
-
// Handle a span from @opentelemetry/sdk-base-trace's `Span` class
|
|
163
101
|
if (spanIsOpenTelemetrySdkTraceBaseSpan(span)) {
|
|
164
102
|
const { attributes, startTime, name, endTime, status, links } = span;
|
|
165
|
-
|
|
166
103
|
return {
|
|
167
104
|
span_id,
|
|
168
105
|
trace_id,
|
|
@@ -171,38 +108,27 @@ function spanToJSON(span) {
|
|
|
171
108
|
parent_span_id: getOtelParentSpanId(span),
|
|
172
109
|
start_timestamp: spanTimeInputToSeconds(startTime),
|
|
173
110
|
// This is [0,0] by default in OTEL, in which case we want to interpret this as no end time
|
|
174
|
-
timestamp: spanTimeInputToSeconds(endTime) ||
|
|
111
|
+
timestamp: spanTimeInputToSeconds(endTime) || void 0,
|
|
175
112
|
status: getStatusMessage(status),
|
|
176
113
|
op: attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_OP],
|
|
177
|
-
origin: attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]
|
|
178
|
-
links: convertSpanLinksForEnvelope(links)
|
|
114
|
+
origin: attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN],
|
|
115
|
+
links: convertSpanLinksForEnvelope(links)
|
|
179
116
|
};
|
|
180
117
|
}
|
|
181
|
-
|
|
182
|
-
// Finally, at least we have `spanContext()`....
|
|
183
|
-
// This should not actually happen in reality, but we need to handle it for type safety.
|
|
184
118
|
return {
|
|
185
119
|
span_id,
|
|
186
120
|
trace_id,
|
|
187
121
|
start_timestamp: 0,
|
|
188
|
-
data: {}
|
|
122
|
+
data: {}
|
|
189
123
|
};
|
|
190
124
|
}
|
|
191
|
-
|
|
192
|
-
/**
|
|
193
|
-
* Convert a span to the intermediate {@link StreamedSpanJSON} representation.
|
|
194
|
-
*/
|
|
195
125
|
function spanToStreamedSpanJSON(span) {
|
|
196
126
|
if (spanIsSentrySpan(span)) {
|
|
197
127
|
return span.getStreamedSpanJSON();
|
|
198
128
|
}
|
|
199
|
-
|
|
200
129
|
const { spanId: span_id, traceId: trace_id } = span.spanContext();
|
|
201
|
-
|
|
202
|
-
// Handle a span from @opentelemetry/sdk-base-trace's `Span` class
|
|
203
130
|
if (spanIsOpenTelemetrySdkTraceBaseSpan(span)) {
|
|
204
131
|
const { attributes, startTime, name, endTime, status, links } = span;
|
|
205
|
-
|
|
206
132
|
return {
|
|
207
133
|
name,
|
|
208
134
|
span_id,
|
|
@@ -213,220 +139,114 @@ function spanToStreamedSpanJSON(span) {
|
|
|
213
139
|
is_segment: span === INTERNAL_getSegmentSpan(span),
|
|
214
140
|
status: getSimpleStatusMessage(status),
|
|
215
141
|
attributes,
|
|
216
|
-
links: getStreamedSpanLinks(links)
|
|
142
|
+
links: getStreamedSpanLinks(links)
|
|
217
143
|
};
|
|
218
144
|
}
|
|
219
|
-
|
|
220
|
-
// Finally, as a fallback, at least we have `spanContext()`....
|
|
221
|
-
// This should not actually happen in reality, but we need to handle it for type safety.
|
|
222
145
|
return {
|
|
223
146
|
span_id,
|
|
224
147
|
trace_id,
|
|
225
148
|
start_timestamp: 0,
|
|
226
|
-
name:
|
|
149
|
+
name: "",
|
|
227
150
|
end_timestamp: 0,
|
|
228
|
-
status:
|
|
229
|
-
is_segment: span === INTERNAL_getSegmentSpan(span)
|
|
151
|
+
status: "ok",
|
|
152
|
+
is_segment: span === INTERNAL_getSegmentSpan(span)
|
|
230
153
|
};
|
|
231
154
|
}
|
|
232
|
-
|
|
233
|
-
/**
|
|
234
|
-
* In preparation for the next major of OpenTelemetry, we want to support
|
|
235
|
-
* looking up the parent span id according to the new API
|
|
236
|
-
* In OTel v1, the parent span id is accessed as `parentSpanId`
|
|
237
|
-
* In OTel v2, the parent span id is accessed as `spanId` on the `parentSpanContext`
|
|
238
|
-
*/
|
|
239
155
|
function getOtelParentSpanId(span) {
|
|
240
|
-
return
|
|
241
|
-
? span.parentSpanId
|
|
242
|
-
: 'parentSpanContext' in span
|
|
243
|
-
? (span.parentSpanContext )?.spanId
|
|
244
|
-
: undefined;
|
|
156
|
+
return "parentSpanId" in span ? span.parentSpanId : "parentSpanContext" in span ? span.parentSpanContext?.spanId : void 0;
|
|
245
157
|
}
|
|
246
|
-
|
|
247
|
-
/**
|
|
248
|
-
* Converts a {@link StreamedSpanJSON} to a {@link SerializedSpan}.
|
|
249
|
-
* This is the final serialized span format that is sent to Sentry.
|
|
250
|
-
* The returned serilaized spans must not be consumed by users or SDK integrations.
|
|
251
|
-
*/
|
|
252
158
|
function streamedSpanJsonToSerializedSpan(spanJson) {
|
|
253
159
|
return {
|
|
254
160
|
...spanJson,
|
|
255
161
|
attributes: attributes.serializeAttributes(spanJson.attributes),
|
|
256
|
-
links: spanJson.links?.map(link => ({
|
|
162
|
+
links: spanJson.links?.map((link) => ({
|
|
257
163
|
...link,
|
|
258
|
-
attributes: attributes.serializeAttributes(link.attributes)
|
|
259
|
-
}))
|
|
164
|
+
attributes: attributes.serializeAttributes(link.attributes)
|
|
165
|
+
}))
|
|
260
166
|
};
|
|
261
167
|
}
|
|
262
|
-
|
|
263
168
|
function spanIsOpenTelemetrySdkTraceBaseSpan(span) {
|
|
264
|
-
const castSpan = span
|
|
169
|
+
const castSpan = span;
|
|
265
170
|
return !!castSpan.attributes && !!castSpan.startTime && !!castSpan.name && !!castSpan.endTime && !!castSpan.status;
|
|
266
171
|
}
|
|
267
|
-
|
|
268
|
-
/** Exported only for tests. */
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* Sadly, due to circular dependency checks we cannot actually import the Span class here and check for instanceof.
|
|
272
|
-
* :( So instead we approximate this by checking if it has the `getSpanJSON` method.
|
|
273
|
-
*/
|
|
274
172
|
function spanIsSentrySpan(span) {
|
|
275
|
-
return typeof
|
|
173
|
+
return typeof span.getSpanJSON === "function";
|
|
276
174
|
}
|
|
277
|
-
|
|
278
|
-
/**
|
|
279
|
-
* Returns true if a span is sampled.
|
|
280
|
-
* In most cases, you should just use `span.isRecording()` instead.
|
|
281
|
-
* However, this has a slightly different semantic, as it also returns false if the span is finished.
|
|
282
|
-
* So in the case where this distinction is important, use this method.
|
|
283
|
-
*/
|
|
284
175
|
function spanIsSampled(span) {
|
|
285
|
-
// We align our trace flags with the ones OpenTelemetry use
|
|
286
|
-
// So we also check for sampled the same way they do.
|
|
287
176
|
const { traceFlags } = span.spanContext();
|
|
288
177
|
return traceFlags === TRACE_FLAG_SAMPLED;
|
|
289
178
|
}
|
|
290
|
-
|
|
291
|
-
/** Get the status message to use for a JSON representation of a span. */
|
|
292
179
|
function getStatusMessage(status) {
|
|
293
180
|
if (!status || status.code === spanstatus.SPAN_STATUS_UNSET) {
|
|
294
|
-
return
|
|
181
|
+
return void 0;
|
|
295
182
|
}
|
|
296
|
-
|
|
297
183
|
if (status.code === spanstatus.SPAN_STATUS_OK) {
|
|
298
|
-
return
|
|
184
|
+
return "ok";
|
|
299
185
|
}
|
|
300
|
-
|
|
301
|
-
return status.message || 'internal_error';
|
|
186
|
+
return status.message || "internal_error";
|
|
302
187
|
}
|
|
303
|
-
|
|
304
|
-
/**
|
|
305
|
-
* Convert the various statuses to the simple ones expected by Sentry for streamed spans ('ok' is default).
|
|
306
|
-
*/
|
|
307
188
|
function getSimpleStatusMessage(status) {
|
|
308
|
-
return !status ||
|
|
309
|
-
status.code === spanstatus.SPAN_STATUS_OK ||
|
|
310
|
-
status.code === spanstatus.SPAN_STATUS_UNSET ||
|
|
311
|
-
status.message === 'cancelled'
|
|
312
|
-
? 'ok'
|
|
313
|
-
: 'error';
|
|
189
|
+
return !status || status.code === spanstatus.SPAN_STATUS_OK || status.code === spanstatus.SPAN_STATUS_UNSET || status.message === "cancelled" ? "ok" : "error";
|
|
314
190
|
}
|
|
315
|
-
|
|
316
|
-
const
|
|
317
|
-
const ROOT_SPAN_FIELD = '_sentryRootSpan';
|
|
318
|
-
|
|
319
|
-
/**
|
|
320
|
-
* Adds an opaque child span reference to a span.
|
|
321
|
-
*/
|
|
191
|
+
const CHILD_SPANS_FIELD = "_sentryChildSpans";
|
|
192
|
+
const ROOT_SPAN_FIELD = "_sentryRootSpan";
|
|
322
193
|
function addChildSpanToSpan(span, childSpan) {
|
|
323
|
-
// We store the root span reference on the child span
|
|
324
|
-
// We need this for `getRootSpan()` to work
|
|
325
194
|
const rootSpan = span[ROOT_SPAN_FIELD] || span;
|
|
326
|
-
object.addNonEnumerableProperty(childSpan
|
|
327
|
-
|
|
328
|
-
// We store a list of child spans on the parent span
|
|
329
|
-
// We need this for `getSpanDescendants()` to work
|
|
195
|
+
object.addNonEnumerableProperty(childSpan, ROOT_SPAN_FIELD, rootSpan);
|
|
330
196
|
if (span[CHILD_SPANS_FIELD]) {
|
|
331
197
|
span[CHILD_SPANS_FIELD].add(childSpan);
|
|
332
198
|
} else {
|
|
333
|
-
object.addNonEnumerableProperty(span, CHILD_SPANS_FIELD, new Set([childSpan]));
|
|
199
|
+
object.addNonEnumerableProperty(span, CHILD_SPANS_FIELD, /* @__PURE__ */ new Set([childSpan]));
|
|
334
200
|
}
|
|
335
201
|
}
|
|
336
|
-
|
|
337
|
-
/** This is only used internally by Idle Spans. */
|
|
338
202
|
function removeChildSpanFromSpan(span, childSpan) {
|
|
339
203
|
if (span[CHILD_SPANS_FIELD]) {
|
|
340
204
|
span[CHILD_SPANS_FIELD].delete(childSpan);
|
|
341
205
|
}
|
|
342
206
|
}
|
|
343
|
-
|
|
344
|
-
/**
|
|
345
|
-
* Returns an array of the given span and all of its descendants.
|
|
346
|
-
*/
|
|
347
207
|
function getSpanDescendants(span) {
|
|
348
|
-
const resultSet = new Set();
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
// This exit condition is required to not infinitely loop in case of a circular dependency.
|
|
352
|
-
if (resultSet.has(span)) {
|
|
208
|
+
const resultSet = /* @__PURE__ */ new Set();
|
|
209
|
+
function addSpanChildren(span2) {
|
|
210
|
+
if (resultSet.has(span2)) {
|
|
353
211
|
return;
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
const childSpans = span[CHILD_SPANS_FIELD] ? Array.from(span[CHILD_SPANS_FIELD]) : [];
|
|
212
|
+
} else if (spanIsSampled(span2)) {
|
|
213
|
+
resultSet.add(span2);
|
|
214
|
+
const childSpans = span2[CHILD_SPANS_FIELD] ? Array.from(span2[CHILD_SPANS_FIELD]) : [];
|
|
358
215
|
for (const childSpan of childSpans) {
|
|
359
216
|
addSpanChildren(childSpan);
|
|
360
217
|
}
|
|
361
218
|
}
|
|
362
219
|
}
|
|
363
|
-
|
|
364
220
|
addSpanChildren(span);
|
|
365
|
-
|
|
366
221
|
return Array.from(resultSet);
|
|
367
222
|
}
|
|
368
|
-
|
|
369
|
-
/**
|
|
370
|
-
* Returns the root span of a given span.
|
|
371
|
-
*/
|
|
372
223
|
const getRootSpan = INTERNAL_getSegmentSpan;
|
|
373
|
-
|
|
374
|
-
/**
|
|
375
|
-
* Returns the segment span of a given span.
|
|
376
|
-
*/
|
|
377
224
|
function INTERNAL_getSegmentSpan(span) {
|
|
378
225
|
return span[ROOT_SPAN_FIELD] || span;
|
|
379
226
|
}
|
|
380
|
-
|
|
381
|
-
/**
|
|
382
|
-
* Returns the currently active span.
|
|
383
|
-
*/
|
|
384
227
|
function getActiveSpan() {
|
|
385
228
|
const carrier$1 = carrier.getMainCarrier();
|
|
386
229
|
const acs = index.getAsyncContextStrategy(carrier$1);
|
|
387
230
|
if (acs.getActiveSpan) {
|
|
388
231
|
return acs.getActiveSpan();
|
|
389
232
|
}
|
|
390
|
-
|
|
391
233
|
return spanOnScope._getSpanForScope(currentScopes.getCurrentScope());
|
|
392
234
|
}
|
|
393
|
-
|
|
394
|
-
/**
|
|
395
|
-
* Logs a warning once if `beforeSendSpan` is used to drop spans.
|
|
396
|
-
*/
|
|
397
235
|
function showSpanDropWarning() {
|
|
398
236
|
if (!hasShownSpanDropWarning) {
|
|
399
237
|
debugLogger.consoleSandbox(() => {
|
|
400
|
-
// eslint-disable-next-line no-console
|
|
401
238
|
console.warn(
|
|
402
|
-
|
|
239
|
+
"[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`."
|
|
403
240
|
);
|
|
404
241
|
});
|
|
405
242
|
hasShownSpanDropWarning = true;
|
|
406
243
|
}
|
|
407
244
|
}
|
|
408
|
-
|
|
409
|
-
/**
|
|
410
|
-
* Updates the name of the given span and ensures that the span name is not
|
|
411
|
-
* overwritten by the Sentry SDK.
|
|
412
|
-
*
|
|
413
|
-
* Use this function instead of `span.updateName()` if you want to make sure that
|
|
414
|
-
* your name is kept. For some spans, for example root `http.server` spans the
|
|
415
|
-
* Sentry SDK would otherwise overwrite the span name with a high-quality name
|
|
416
|
-
* it infers when the span ends.
|
|
417
|
-
*
|
|
418
|
-
* Use this function in server code or when your span is started on the server
|
|
419
|
-
* and on the client (browser). If you only update a span name on the client,
|
|
420
|
-
* you can also use `span.updateName()` the SDK does not overwrite the name.
|
|
421
|
-
*
|
|
422
|
-
* @param span - The span to update the name of.
|
|
423
|
-
* @param name - The name to set on the span.
|
|
424
|
-
*/
|
|
425
245
|
function updateSpanName(span, name) {
|
|
426
246
|
span.updateName(name);
|
|
427
247
|
span.setAttributes({
|
|
428
|
-
[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]:
|
|
429
|
-
[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME]: name
|
|
248
|
+
[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: "custom",
|
|
249
|
+
[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME]: name
|
|
430
250
|
});
|
|
431
251
|
}
|
|
432
252
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spanUtils.js","sources":["../../../src/utils/spanUtils.ts"],"sourcesContent":["import { getAsyncContextStrategy } from '../asyncContext';\nimport type { RawAttributes } from '../attributes';\nimport { serializeAttributes } from '../attributes';\nimport { getMainCarrier } from '../carrier';\nimport { getCurrentScope } from '../currentScopes';\nimport {\n SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME,\n SEMANTIC_ATTRIBUTE_SENTRY_OP,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,\n} from '../semanticAttributes';\nimport type { SentrySpan } from '../tracing/sentrySpan';\nimport { SPAN_STATUS_OK, SPAN_STATUS_UNSET } from '../tracing/spanstatus';\nimport { getCapturedScopesOnSpan } from '../tracing/utils';\nimport type { TraceContext } from '../types-hoist/context';\nimport type { SpanLink, SpanLinkJSON } from '../types-hoist/link';\nimport type {\n SerializedStreamedSpan,\n Span,\n SpanAttributes,\n SpanJSON,\n SpanOrigin,\n SpanTimeInput,\n StreamedSpanJSON,\n} from '../types-hoist/span';\nimport type { SpanStatus } from '../types-hoist/spanStatus';\nimport { addNonEnumerableProperty } from '../utils/object';\nimport { generateSpanId } from '../utils/propagationContext';\nimport { timestampInSeconds } from '../utils/time';\nimport { generateSentryTraceHeader, generateTraceparentHeader } from '../utils/tracing';\nimport { consoleSandbox } from './debug-logger';\nimport { _getSpanForScope } from './spanOnScope';\n\n// These are aligned with OpenTelemetry trace flags\nexport const TRACE_FLAG_NONE = 0x0;\nexport const TRACE_FLAG_SAMPLED = 0x1;\n\nlet hasShownSpanDropWarning = false;\n\n/**\n * Convert a span to a trace context, which can be sent as the `trace` context in an event.\n * By default, this will only include trace_id, span_id & parent_span_id.\n * If `includeAllData` is true, it will also include data, op, status & origin.\n */\nexport function spanToTransactionTraceContext(span: Span): TraceContext {\n const { spanId: span_id, traceId: trace_id } = span.spanContext();\n const { data, op, parent_span_id, status, origin, links } = spanToJSON(span);\n\n return {\n parent_span_id,\n span_id,\n trace_id,\n data,\n op,\n status,\n origin,\n links,\n };\n}\n\n/**\n * Convert a span to a trace context, which can be sent as the `trace` context in a non-transaction event.\n */\nexport function spanToTraceContext(span: Span): TraceContext {\n const { spanId, traceId: trace_id, isRemote } = span.spanContext();\n\n // If the span is remote, we use a random/virtual span as span_id to the trace context,\n // and the remote span as parent_span_id\n const parent_span_id = isRemote ? spanId : spanToJSON(span).parent_span_id;\n const scope = getCapturedScopesOnSpan(span).scope;\n\n const span_id = isRemote ? scope?.getPropagationContext().propagationSpanId || generateSpanId() : spanId;\n\n return {\n parent_span_id,\n span_id,\n trace_id,\n };\n}\n\n/**\n * Convert a Span to a Sentry trace header.\n */\nexport function spanToTraceHeader(span: Span): string {\n const { traceId, spanId } = span.spanContext();\n const sampled = spanIsSampled(span);\n return generateSentryTraceHeader(traceId, spanId, sampled);\n}\n\n/**\n * Convert a Span to a W3C traceparent header.\n */\nexport function spanToTraceparentHeader(span: Span): string {\n const { traceId, spanId } = span.spanContext();\n const sampled = spanIsSampled(span);\n return generateTraceparentHeader(traceId, spanId, sampled);\n}\n\n/**\n * Converts the span links array to a flattened version to be sent within an envelope.\n *\n * If the links array is empty, it returns `undefined` so the empty value can be dropped before it's sent.\n */\nexport function convertSpanLinksForEnvelope(links?: SpanLink[]): SpanLinkJSON[] | undefined {\n if (links && links.length > 0) {\n return links.map(({ context: { spanId, traceId, traceFlags, ...restContext }, attributes }) => ({\n span_id: spanId,\n trace_id: traceId,\n sampled: traceFlags === TRACE_FLAG_SAMPLED,\n attributes,\n ...restContext,\n }));\n } else {\n return undefined;\n }\n}\n\n/**\n * Converts the span links array to a flattened version with serialized attributes for V2 spans.\n *\n * If the links array is empty, it returns `undefined` so the empty value can be dropped before it's sent.\n */\nexport function getStreamedSpanLinks(\n links?: SpanLink[],\n): SpanLinkJSON<RawAttributes<Record<string, unknown>>>[] | undefined {\n if (links?.length) {\n return links.map(({ context: { spanId, traceId, traceFlags }, attributes }) => ({\n span_id: spanId,\n trace_id: traceId,\n sampled: traceFlags === TRACE_FLAG_SAMPLED,\n attributes,\n }));\n } else {\n return undefined;\n }\n}\n\n/**\n * Convert a span time input into a timestamp in seconds.\n */\nexport function spanTimeInputToSeconds(input: SpanTimeInput | undefined): number {\n if (typeof input === 'number') {\n return ensureTimestampInSeconds(input);\n }\n\n if (Array.isArray(input)) {\n // See {@link HrTime} for the array-based time format\n return input[0] + input[1] / 1e9;\n }\n\n if (input instanceof Date) {\n return ensureTimestampInSeconds(input.getTime());\n }\n\n return timestampInSeconds();\n}\n\n/**\n * Converts a timestamp to second, if it was in milliseconds, or keeps it as second.\n */\nfunction ensureTimestampInSeconds(timestamp: number): number {\n const isMs = timestamp > 9999999999;\n return isMs ? timestamp / 1000 : timestamp;\n}\n\n/**\n * Convert a span to a JSON representation.\n */\n// Note: Because of this, we currently have a circular type dependency (which we opted out of in package.json).\n// This is not avoidable as we need `spanToJSON` in `spanUtils.ts`, which in turn is needed by `span.ts` for backwards compatibility.\n// And `spanToJSON` needs the Span class from `span.ts` to check here.\nexport function spanToJSON(span: Span): SpanJSON {\n if (spanIsSentrySpan(span)) {\n return span.getSpanJSON();\n }\n\n const { spanId: span_id, traceId: trace_id } = span.spanContext();\n\n // Handle a span from @opentelemetry/sdk-base-trace's `Span` class\n if (spanIsOpenTelemetrySdkTraceBaseSpan(span)) {\n const { attributes, startTime, name, endTime, status, links } = span;\n\n return {\n span_id,\n trace_id,\n data: attributes,\n description: name,\n parent_span_id: getOtelParentSpanId(span),\n start_timestamp: spanTimeInputToSeconds(startTime),\n // This is [0,0] by default in OTEL, in which case we want to interpret this as no end time\n timestamp: spanTimeInputToSeconds(endTime) || undefined,\n status: getStatusMessage(status),\n op: attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP],\n origin: attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] as SpanOrigin | undefined,\n links: convertSpanLinksForEnvelope(links),\n };\n }\n\n // Finally, at least we have `spanContext()`....\n // This should not actually happen in reality, but we need to handle it for type safety.\n return {\n span_id,\n trace_id,\n start_timestamp: 0,\n data: {},\n };\n}\n\n/**\n * Convert a span to the intermediate {@link StreamedSpanJSON} representation.\n */\nexport function spanToStreamedSpanJSON(span: Span): StreamedSpanJSON {\n if (spanIsSentrySpan(span)) {\n return span.getStreamedSpanJSON();\n }\n\n const { spanId: span_id, traceId: trace_id } = span.spanContext();\n\n // Handle a span from @opentelemetry/sdk-base-trace's `Span` class\n if (spanIsOpenTelemetrySdkTraceBaseSpan(span)) {\n const { attributes, startTime, name, endTime, status, links } = span;\n\n return {\n name,\n span_id,\n trace_id,\n parent_span_id: getOtelParentSpanId(span),\n start_timestamp: spanTimeInputToSeconds(startTime),\n end_timestamp: spanTimeInputToSeconds(endTime),\n is_segment: span === INTERNAL_getSegmentSpan(span),\n status: getSimpleStatusMessage(status),\n attributes,\n links: getStreamedSpanLinks(links),\n };\n }\n\n // Finally, as a fallback, at least we have `spanContext()`....\n // This should not actually happen in reality, but we need to handle it for type safety.\n return {\n span_id,\n trace_id,\n start_timestamp: 0,\n name: '',\n end_timestamp: 0,\n status: 'ok',\n is_segment: span === INTERNAL_getSegmentSpan(span),\n };\n}\n\n/**\n * In preparation for the next major of OpenTelemetry, we want to support\n * looking up the parent span id according to the new API\n * In OTel v1, the parent span id is accessed as `parentSpanId`\n * In OTel v2, the parent span id is accessed as `spanId` on the `parentSpanContext`\n */\nfunction getOtelParentSpanId(span: OpenTelemetrySdkTraceBaseSpan): string | undefined {\n return 'parentSpanId' in span\n ? span.parentSpanId\n : 'parentSpanContext' in span\n ? (span.parentSpanContext as { spanId?: string } | undefined)?.spanId\n : undefined;\n}\n\n/**\n * Converts a {@link StreamedSpanJSON} to a {@link SerializedSpan}.\n * This is the final serialized span format that is sent to Sentry.\n * The returned serilaized spans must not be consumed by users or SDK integrations.\n */\nexport function streamedSpanJsonToSerializedSpan(spanJson: StreamedSpanJSON): SerializedStreamedSpan {\n return {\n ...spanJson,\n attributes: serializeAttributes(spanJson.attributes),\n links: spanJson.links?.map(link => ({\n ...link,\n attributes: serializeAttributes(link.attributes),\n })),\n };\n}\n\nfunction spanIsOpenTelemetrySdkTraceBaseSpan(span: Span): span is OpenTelemetrySdkTraceBaseSpan {\n const castSpan = span as Partial<OpenTelemetrySdkTraceBaseSpan>;\n return !!castSpan.attributes && !!castSpan.startTime && !!castSpan.name && !!castSpan.endTime && !!castSpan.status;\n}\n\n/** Exported only for tests. */\nexport interface OpenTelemetrySdkTraceBaseSpan extends Span {\n attributes: SpanAttributes;\n startTime: SpanTimeInput;\n name: string;\n status: SpanStatus;\n endTime: SpanTimeInput;\n parentSpanId?: string;\n links?: SpanLink[];\n}\n\n/**\n * Sadly, due to circular dependency checks we cannot actually import the Span class here and check for instanceof.\n * :( So instead we approximate this by checking if it has the `getSpanJSON` method.\n */\nfunction spanIsSentrySpan(span: Span): span is SentrySpan {\n return typeof (span as SentrySpan).getSpanJSON === 'function';\n}\n\n/**\n * Returns true if a span is sampled.\n * In most cases, you should just use `span.isRecording()` instead.\n * However, this has a slightly different semantic, as it also returns false if the span is finished.\n * So in the case where this distinction is important, use this method.\n */\nexport function spanIsSampled(span: Span): boolean {\n // We align our trace flags with the ones OpenTelemetry use\n // So we also check for sampled the same way they do.\n const { traceFlags } = span.spanContext();\n return traceFlags === TRACE_FLAG_SAMPLED;\n}\n\n/** Get the status message to use for a JSON representation of a span. */\nexport function getStatusMessage(status: SpanStatus | undefined): string | undefined {\n if (!status || status.code === SPAN_STATUS_UNSET) {\n return undefined;\n }\n\n if (status.code === SPAN_STATUS_OK) {\n return 'ok';\n }\n\n return status.message || 'internal_error';\n}\n\n/**\n * Convert the various statuses to the simple ones expected by Sentry for streamed spans ('ok' is default).\n */\nexport function getSimpleStatusMessage(status: SpanStatus | undefined): 'ok' | 'error' {\n return !status ||\n status.code === SPAN_STATUS_OK ||\n status.code === SPAN_STATUS_UNSET ||\n status.message === 'cancelled'\n ? 'ok'\n : 'error';\n}\n\nconst CHILD_SPANS_FIELD = '_sentryChildSpans';\nconst ROOT_SPAN_FIELD = '_sentryRootSpan';\n\ntype SpanWithPotentialChildren = Span & {\n [CHILD_SPANS_FIELD]?: Set<Span>;\n [ROOT_SPAN_FIELD]?: Span;\n};\n\n/**\n * Adds an opaque child span reference to a span.\n */\nexport function addChildSpanToSpan(span: SpanWithPotentialChildren, childSpan: Span): void {\n // We store the root span reference on the child span\n // We need this for `getRootSpan()` to work\n const rootSpan = span[ROOT_SPAN_FIELD] || span;\n addNonEnumerableProperty(childSpan as SpanWithPotentialChildren, ROOT_SPAN_FIELD, rootSpan);\n\n // We store a list of child spans on the parent span\n // We need this for `getSpanDescendants()` to work\n if (span[CHILD_SPANS_FIELD]) {\n span[CHILD_SPANS_FIELD].add(childSpan);\n } else {\n addNonEnumerableProperty(span, CHILD_SPANS_FIELD, new Set([childSpan]));\n }\n}\n\n/** This is only used internally by Idle Spans. */\nexport function removeChildSpanFromSpan(span: SpanWithPotentialChildren, childSpan: Span): void {\n if (span[CHILD_SPANS_FIELD]) {\n span[CHILD_SPANS_FIELD].delete(childSpan);\n }\n}\n\n/**\n * Returns an array of the given span and all of its descendants.\n */\nexport function getSpanDescendants(span: SpanWithPotentialChildren): Span[] {\n const resultSet = new Set<Span>();\n\n function addSpanChildren(span: SpanWithPotentialChildren): void {\n // This exit condition is required to not infinitely loop in case of a circular dependency.\n if (resultSet.has(span)) {\n return;\n // We want to ignore unsampled spans (e.g. non recording spans)\n } else if (spanIsSampled(span)) {\n resultSet.add(span);\n const childSpans = span[CHILD_SPANS_FIELD] ? Array.from(span[CHILD_SPANS_FIELD]) : [];\n for (const childSpan of childSpans) {\n addSpanChildren(childSpan);\n }\n }\n }\n\n addSpanChildren(span);\n\n return Array.from(resultSet);\n}\n\n/**\n * Returns the root span of a given span.\n */\nexport const getRootSpan = INTERNAL_getSegmentSpan;\n\n/**\n * Returns the segment span of a given span.\n */\nexport function INTERNAL_getSegmentSpan(span: SpanWithPotentialChildren): Span {\n return span[ROOT_SPAN_FIELD] || span;\n}\n\n/**\n * Returns the currently active span.\n */\nexport function getActiveSpan(): Span | undefined {\n const carrier = getMainCarrier();\n const acs = getAsyncContextStrategy(carrier);\n if (acs.getActiveSpan) {\n return acs.getActiveSpan();\n }\n\n return _getSpanForScope(getCurrentScope());\n}\n\n/**\n * Logs a warning once if `beforeSendSpan` is used to drop spans.\n */\nexport function showSpanDropWarning(): void {\n if (!hasShownSpanDropWarning) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn(\n '[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.',\n );\n });\n hasShownSpanDropWarning = true;\n }\n}\n\n/**\n * Updates the name of the given span and ensures that the span name is not\n * overwritten by the Sentry SDK.\n *\n * Use this function instead of `span.updateName()` if you want to make sure that\n * your name is kept. For some spans, for example root `http.server` spans the\n * Sentry SDK would otherwise overwrite the span name with a high-quality name\n * it infers when the span ends.\n *\n * Use this function in server code or when your span is started on the server\n * and on the client (browser). If you only update a span name on the client,\n * you can also use `span.updateName()` the SDK does not overwrite the name.\n *\n * @param span - The span to update the name of.\n * @param name - The name to set on the span.\n */\nexport function updateSpanName(span: Span, name: string): void {\n span.updateName(name);\n span.setAttributes({\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'custom',\n [SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME]: name,\n });\n}\n"],"names":["getCapturedScopesOnSpan","generateSpanId","generateSentryTraceHeader","generateTraceparentHeader","timestampInSeconds","SEMANTIC_ATTRIBUTE_SENTRY_OP","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","serializeAttributes","SPAN_STATUS_UNSET","SPAN_STATUS_OK","addNonEnumerableProperty","carrier","getMainCarrier","getAsyncContextStrategy","_getSpanForScope","getCurrentScope","consoleSandbox","SEMANTIC_ATTRIBUTE_SENTRY_SOURCE","SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME"],"mappings":";;;;;;;;;;;;;;;;AAiCA;AACO,MAAM,eAAA,GAAkB;AACxB,MAAM,kBAAA,GAAqB;;AAElC,IAAI,uBAAA,GAA0B,KAAK;;AAEnC;AACA;AACA;AACA;AACA;AACO,SAAS,6BAA6B,CAAC,IAAI,EAAsB;AACxE,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,QAAA,KAAa,IAAI,CAAC,WAAW,EAAE;AACnE,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,EAA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,CAAC,aAAa,EAAE;AACzB,IAAI,OAAO,GAAG,CAAC,aAAa,EAAE;AAC9B,EAAE;;AAEF,EAAE,OAAOG,4BAAgB,CAACC,6BAAe,EAAE,CAAC;AAC5C;;AAEA;AACA;AACA;AACO,SAAS,mBAAmB,GAAS;AAC5C,EAAE,IAAI,CAAC,uBAAuB,EAAE;AAChC,IAAIC,0BAAc,CAAC,MAAM;AACzB;AACA,MAAM,OAAO,CAAC,IAAI;AAClB,QAAQ,0JAA0J;AAClK,OAAO;AACP,IAAI,CAAC,CAAC;AACN,IAAI,uBAAA,GAA0B,IAAI;AAClC,EAAE;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,cAAc,CAAC,IAAI,EAAQ,IAAI,EAAgB;AAC/D,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;AACvB,EAAE,IAAI,CAAC,aAAa,CAAC;AACrB,IAAI,CAACC,mDAAgC,GAAG,QAAQ;AAChD,IAAI,CAACC,6DAA0C,GAAG,IAAI;AACtD,GAAG,CAAC;AACJ;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"spanUtils.js","sources":["../../../src/utils/spanUtils.ts"],"sourcesContent":["import { getAsyncContextStrategy } from '../asyncContext';\nimport type { RawAttributes } from '../attributes';\nimport { serializeAttributes } from '../attributes';\nimport { getMainCarrier } from '../carrier';\nimport { getCurrentScope } from '../currentScopes';\nimport {\n SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME,\n SEMANTIC_ATTRIBUTE_SENTRY_OP,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,\n} from '../semanticAttributes';\nimport type { SentrySpan } from '../tracing/sentrySpan';\nimport { SPAN_STATUS_OK, SPAN_STATUS_UNSET } from '../tracing/spanstatus';\nimport { getCapturedScopesOnSpan } from '../tracing/utils';\nimport type { TraceContext } from '../types/context';\nimport type { SpanLink, SpanLinkJSON } from '../types/link';\nimport type {\n SerializedStreamedSpan,\n Span,\n SpanAttributes,\n SpanJSON,\n SpanOrigin,\n SpanTimeInput,\n StreamedSpanJSON,\n} from '../types/span';\nimport type { SpanStatus } from '../types/spanStatus';\nimport { addNonEnumerableProperty } from '../utils/object';\nimport { generateSpanId } from '../utils/propagationContext';\nimport { timestampInSeconds } from '../utils/time';\nimport { generateSentryTraceHeader, generateTraceparentHeader } from '../utils/tracing';\nimport { consoleSandbox } from './debug-logger';\nimport { _getSpanForScope } from './spanOnScope';\n\n// These are aligned with OpenTelemetry trace flags\nexport const TRACE_FLAG_NONE = 0x0;\nexport const TRACE_FLAG_SAMPLED = 0x1;\n\nlet hasShownSpanDropWarning = false;\n\n/**\n * Convert a span to a trace context, which can be sent as the `trace` context in an event.\n * By default, this will only include trace_id, span_id & parent_span_id.\n * If `includeAllData` is true, it will also include data, op, status & origin.\n */\nexport function spanToTransactionTraceContext(span: Span): TraceContext {\n const { spanId: span_id, traceId: trace_id } = span.spanContext();\n const { data, op, parent_span_id, status, origin, links } = spanToJSON(span);\n\n return {\n parent_span_id,\n span_id,\n trace_id,\n data,\n op,\n status,\n origin,\n links,\n };\n}\n\n/**\n * Convert a span to a trace context, which can be sent as the `trace` context in a non-transaction event.\n */\nexport function spanToTraceContext(span: Span): TraceContext {\n const { spanId, traceId: trace_id, isRemote } = span.spanContext();\n\n // If the span is remote, we use a random/virtual span as span_id to the trace context,\n // and the remote span as parent_span_id\n const parent_span_id = isRemote ? spanId : spanToJSON(span).parent_span_id;\n const scope = getCapturedScopesOnSpan(span).scope;\n\n const span_id = isRemote ? scope?.getPropagationContext().propagationSpanId || generateSpanId() : spanId;\n\n return {\n parent_span_id,\n span_id,\n trace_id,\n };\n}\n\n/**\n * Convert a Span to a Sentry trace header.\n */\nexport function spanToTraceHeader(span: Span): string {\n const { traceId, spanId } = span.spanContext();\n const sampled = spanIsSampled(span);\n return generateSentryTraceHeader(traceId, spanId, sampled);\n}\n\n/**\n * Convert a Span to a W3C traceparent header.\n */\nexport function spanToTraceparentHeader(span: Span): string {\n const { traceId, spanId } = span.spanContext();\n const sampled = spanIsSampled(span);\n return generateTraceparentHeader(traceId, spanId, sampled);\n}\n\n/**\n * Converts the span links array to a flattened version to be sent within an envelope.\n *\n * If the links array is empty, it returns `undefined` so the empty value can be dropped before it's sent.\n */\nexport function convertSpanLinksForEnvelope(links?: SpanLink[]): SpanLinkJSON[] | undefined {\n if (links && links.length > 0) {\n return links.map(({ context: { spanId, traceId, traceFlags, ...restContext }, attributes }) => ({\n span_id: spanId,\n trace_id: traceId,\n sampled: traceFlags === TRACE_FLAG_SAMPLED,\n attributes,\n ...restContext,\n }));\n } else {\n return undefined;\n }\n}\n\n/**\n * Converts the span links array to a flattened version with serialized attributes for V2 spans.\n *\n * If the links array is empty, it returns `undefined` so the empty value can be dropped before it's sent.\n */\nexport function getStreamedSpanLinks(\n links?: SpanLink[],\n): SpanLinkJSON<RawAttributes<Record<string, unknown>>>[] | undefined {\n if (links?.length) {\n return links.map(({ context: { spanId, traceId, traceFlags }, attributes }) => ({\n span_id: spanId,\n trace_id: traceId,\n sampled: traceFlags === TRACE_FLAG_SAMPLED,\n attributes,\n }));\n } else {\n return undefined;\n }\n}\n\n/**\n * Convert a span time input into a timestamp in seconds.\n */\nexport function spanTimeInputToSeconds(input: SpanTimeInput | undefined): number {\n if (typeof input === 'number') {\n return ensureTimestampInSeconds(input);\n }\n\n if (Array.isArray(input)) {\n // See {@link HrTime} for the array-based time format\n return input[0] + input[1] / 1e9;\n }\n\n if (input instanceof Date) {\n return ensureTimestampInSeconds(input.getTime());\n }\n\n return timestampInSeconds();\n}\n\n/**\n * Converts a timestamp to second, if it was in milliseconds, or keeps it as second.\n */\nfunction ensureTimestampInSeconds(timestamp: number): number {\n const isMs = timestamp > 9999999999;\n return isMs ? timestamp / 1000 : timestamp;\n}\n\n/**\n * Convert a span to a JSON representation.\n */\n// Note: Because of this, we currently have a circular type dependency (which we opted out of in package.json).\n// This is not avoidable as we need `spanToJSON` in `spanUtils.ts`, which in turn is needed by `span.ts` for backwards compatibility.\n// And `spanToJSON` needs the Span class from `span.ts` to check here.\nexport function spanToJSON(span: Span): SpanJSON {\n if (spanIsSentrySpan(span)) {\n return span.getSpanJSON();\n }\n\n const { spanId: span_id, traceId: trace_id } = span.spanContext();\n\n // Handle a span from @opentelemetry/sdk-base-trace's `Span` class\n if (spanIsOpenTelemetrySdkTraceBaseSpan(span)) {\n const { attributes, startTime, name, endTime, status, links } = span;\n\n return {\n span_id,\n trace_id,\n data: attributes,\n description: name,\n parent_span_id: getOtelParentSpanId(span),\n start_timestamp: spanTimeInputToSeconds(startTime),\n // This is [0,0] by default in OTEL, in which case we want to interpret this as no end time\n timestamp: spanTimeInputToSeconds(endTime) || undefined,\n status: getStatusMessage(status),\n op: attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP],\n origin: attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] as SpanOrigin | undefined,\n links: convertSpanLinksForEnvelope(links),\n };\n }\n\n // Finally, at least we have `spanContext()`....\n // This should not actually happen in reality, but we need to handle it for type safety.\n return {\n span_id,\n trace_id,\n start_timestamp: 0,\n data: {},\n };\n}\n\n/**\n * Convert a span to the intermediate {@link StreamedSpanJSON} representation.\n */\nexport function spanToStreamedSpanJSON(span: Span): StreamedSpanJSON {\n if (spanIsSentrySpan(span)) {\n return span.getStreamedSpanJSON();\n }\n\n const { spanId: span_id, traceId: trace_id } = span.spanContext();\n\n // Handle a span from @opentelemetry/sdk-base-trace's `Span` class\n if (spanIsOpenTelemetrySdkTraceBaseSpan(span)) {\n const { attributes, startTime, name, endTime, status, links } = span;\n\n return {\n name,\n span_id,\n trace_id,\n parent_span_id: getOtelParentSpanId(span),\n start_timestamp: spanTimeInputToSeconds(startTime),\n end_timestamp: spanTimeInputToSeconds(endTime),\n is_segment: span === INTERNAL_getSegmentSpan(span),\n status: getSimpleStatusMessage(status),\n attributes,\n links: getStreamedSpanLinks(links),\n };\n }\n\n // Finally, as a fallback, at least we have `spanContext()`....\n // This should not actually happen in reality, but we need to handle it for type safety.\n return {\n span_id,\n trace_id,\n start_timestamp: 0,\n name: '',\n end_timestamp: 0,\n status: 'ok',\n is_segment: span === INTERNAL_getSegmentSpan(span),\n };\n}\n\n/**\n * In preparation for the next major of OpenTelemetry, we want to support\n * looking up the parent span id according to the new API\n * In OTel v1, the parent span id is accessed as `parentSpanId`\n * In OTel v2, the parent span id is accessed as `spanId` on the `parentSpanContext`\n */\nfunction getOtelParentSpanId(span: OpenTelemetrySdkTraceBaseSpan): string | undefined {\n return 'parentSpanId' in span\n ? span.parentSpanId\n : 'parentSpanContext' in span\n ? (span.parentSpanContext as { spanId?: string } | undefined)?.spanId\n : undefined;\n}\n\n/**\n * Converts a {@link StreamedSpanJSON} to a {@link SerializedSpan}.\n * This is the final serialized span format that is sent to Sentry.\n * The returned serilaized spans must not be consumed by users or SDK integrations.\n */\nexport function streamedSpanJsonToSerializedSpan(spanJson: StreamedSpanJSON): SerializedStreamedSpan {\n return {\n ...spanJson,\n attributes: serializeAttributes(spanJson.attributes),\n links: spanJson.links?.map(link => ({\n ...link,\n attributes: serializeAttributes(link.attributes),\n })),\n };\n}\n\nfunction spanIsOpenTelemetrySdkTraceBaseSpan(span: Span): span is OpenTelemetrySdkTraceBaseSpan {\n const castSpan = span as Partial<OpenTelemetrySdkTraceBaseSpan>;\n return !!castSpan.attributes && !!castSpan.startTime && !!castSpan.name && !!castSpan.endTime && !!castSpan.status;\n}\n\n/** Exported only for tests. */\nexport interface OpenTelemetrySdkTraceBaseSpan extends Span {\n attributes: SpanAttributes;\n startTime: SpanTimeInput;\n name: string;\n status: SpanStatus;\n endTime: SpanTimeInput;\n parentSpanId?: string;\n links?: SpanLink[];\n}\n\n/**\n * Sadly, due to circular dependency checks we cannot actually import the Span class here and check for instanceof.\n * :( So instead we approximate this by checking if it has the `getSpanJSON` method.\n */\nfunction spanIsSentrySpan(span: Span): span is SentrySpan {\n return typeof (span as SentrySpan).getSpanJSON === 'function';\n}\n\n/**\n * Returns true if a span is sampled.\n * In most cases, you should just use `span.isRecording()` instead.\n * However, this has a slightly different semantic, as it also returns false if the span is finished.\n * So in the case where this distinction is important, use this method.\n */\nexport function spanIsSampled(span: Span): boolean {\n // We align our trace flags with the ones OpenTelemetry use\n // So we also check for sampled the same way they do.\n const { traceFlags } = span.spanContext();\n return traceFlags === TRACE_FLAG_SAMPLED;\n}\n\n/** Get the status message to use for a JSON representation of a span. */\nexport function getStatusMessage(status: SpanStatus | undefined): string | undefined {\n if (!status || status.code === SPAN_STATUS_UNSET) {\n return undefined;\n }\n\n if (status.code === SPAN_STATUS_OK) {\n return 'ok';\n }\n\n return status.message || 'internal_error';\n}\n\n/**\n * Convert the various statuses to the simple ones expected by Sentry for streamed spans ('ok' is default).\n */\nexport function getSimpleStatusMessage(status: SpanStatus | undefined): 'ok' | 'error' {\n return !status ||\n status.code === SPAN_STATUS_OK ||\n status.code === SPAN_STATUS_UNSET ||\n status.message === 'cancelled'\n ? 'ok'\n : 'error';\n}\n\nconst CHILD_SPANS_FIELD = '_sentryChildSpans';\nconst ROOT_SPAN_FIELD = '_sentryRootSpan';\n\ntype SpanWithPotentialChildren = Span & {\n [CHILD_SPANS_FIELD]?: Set<Span>;\n [ROOT_SPAN_FIELD]?: Span;\n};\n\n/**\n * Adds an opaque child span reference to a span.\n */\nexport function addChildSpanToSpan(span: SpanWithPotentialChildren, childSpan: Span): void {\n // We store the root span reference on the child span\n // We need this for `getRootSpan()` to work\n const rootSpan = span[ROOT_SPAN_FIELD] || span;\n addNonEnumerableProperty(childSpan as SpanWithPotentialChildren, ROOT_SPAN_FIELD, rootSpan);\n\n // We store a list of child spans on the parent span\n // We need this for `getSpanDescendants()` to work\n if (span[CHILD_SPANS_FIELD]) {\n span[CHILD_SPANS_FIELD].add(childSpan);\n } else {\n addNonEnumerableProperty(span, CHILD_SPANS_FIELD, new Set([childSpan]));\n }\n}\n\n/** This is only used internally by Idle Spans. */\nexport function removeChildSpanFromSpan(span: SpanWithPotentialChildren, childSpan: Span): void {\n if (span[CHILD_SPANS_FIELD]) {\n span[CHILD_SPANS_FIELD].delete(childSpan);\n }\n}\n\n/**\n * Returns an array of the given span and all of its descendants.\n */\nexport function getSpanDescendants(span: SpanWithPotentialChildren): Span[] {\n const resultSet = new Set<Span>();\n\n function addSpanChildren(span: SpanWithPotentialChildren): void {\n // This exit condition is required to not infinitely loop in case of a circular dependency.\n if (resultSet.has(span)) {\n return;\n // We want to ignore unsampled spans (e.g. non recording spans)\n } else if (spanIsSampled(span)) {\n resultSet.add(span);\n const childSpans = span[CHILD_SPANS_FIELD] ? Array.from(span[CHILD_SPANS_FIELD]) : [];\n for (const childSpan of childSpans) {\n addSpanChildren(childSpan);\n }\n }\n }\n\n addSpanChildren(span);\n\n return Array.from(resultSet);\n}\n\n/**\n * Returns the root span of a given span.\n */\nexport const getRootSpan = INTERNAL_getSegmentSpan;\n\n/**\n * Returns the segment span of a given span.\n */\nexport function INTERNAL_getSegmentSpan(span: SpanWithPotentialChildren): Span {\n return span[ROOT_SPAN_FIELD] || span;\n}\n\n/**\n * Returns the currently active span.\n */\nexport function getActiveSpan(): Span | undefined {\n const carrier = getMainCarrier();\n const acs = getAsyncContextStrategy(carrier);\n if (acs.getActiveSpan) {\n return acs.getActiveSpan();\n }\n\n return _getSpanForScope(getCurrentScope());\n}\n\n/**\n * Logs a warning once if `beforeSendSpan` is used to drop spans.\n */\nexport function showSpanDropWarning(): void {\n if (!hasShownSpanDropWarning) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn(\n '[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.',\n );\n });\n hasShownSpanDropWarning = true;\n }\n}\n\n/**\n * Updates the name of the given span and ensures that the span name is not\n * overwritten by the Sentry SDK.\n *\n * Use this function instead of `span.updateName()` if you want to make sure that\n * your name is kept. For some spans, for example root `http.server` spans the\n * Sentry SDK would otherwise overwrite the span name with a high-quality name\n * it infers when the span ends.\n *\n * Use this function in server code or when your span is started on the server\n * and on the client (browser). If you only update a span name on the client,\n * you can also use `span.updateName()` the SDK does not overwrite the name.\n *\n * @param span - The span to update the name of.\n * @param name - The name to set on the span.\n */\nexport function updateSpanName(span: Span, name: string): void {\n span.updateName(name);\n span.setAttributes({\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'custom',\n [SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME]: name,\n });\n}\n"],"names":["getCapturedScopesOnSpan","generateSpanId","generateSentryTraceHeader","generateTraceparentHeader","timestampInSeconds","SEMANTIC_ATTRIBUTE_SENTRY_OP","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","serializeAttributes","SPAN_STATUS_UNSET","SPAN_STATUS_OK","addNonEnumerableProperty","span","carrier","getMainCarrier","getAsyncContextStrategy","_getSpanForScope","getCurrentScope","consoleSandbox","SEMANTIC_ATTRIBUTE_SENTRY_SOURCE","SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME"],"mappings":";;;;;;;;;;;;;;;;AAkCO,MAAM,eAAA,GAAkB;AACxB,MAAM,kBAAA,GAAqB;AAElC,IAAI,uBAAA,GAA0B,KAAA;AAOvB,SAAS,8BAA8B,IAAA,EAA0B;AACtE,EAAA,MAAM,EAAE,MAAA,EAAQ,OAAA,EAAS,SAAS,QAAA,EAAS,GAAI,KAAK,WAAA,EAAY;AAChE,EAAA,MAAM,EAAE,MAAM,EAAA,EAAI,cAAA,EAAgB,QAAQ,MAAA,EAAQ,KAAA,EAAM,GAAI,UAAA,CAAW,IAAI,CAAA;AAE3E,EAAA,OAAO;AAAA,IACL,cAAA;AAAA,IACA,OAAA;AAAA,IACA,QAAA;AAAA,IACA,IAAA;AAAA,IACA,EAAA;AAAA,IACA,MAAA;AAAA,IACA,MAAA;AA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