@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
package/build/esm/client.js
CHANGED
|
@@ -28,149 +28,67 @@ import { showSpanDropWarning } from './utils/spanUtils.js';
|
|
|
28
28
|
import { rejectedSyncPromise } from './utils/syncpromise.js';
|
|
29
29
|
import { safeUnref } from './utils/timer.js';
|
|
30
30
|
import { convertTransactionEventToSpanJson, convertSpanJsonToTransactionEvent } from './utils/transactionEvent.js';
|
|
31
|
-
|
|
32
|
-
/* eslint-disable max-lines */
|
|
31
|
+
import { resolveDataCollectionOptions } from './utils/data-collection/resolveDataCollectionOptions.js';
|
|
33
32
|
|
|
34
33
|
const ALREADY_SEEN_ERROR = "Not capturing exception because it's already been captured.";
|
|
35
|
-
const MISSING_RELEASE_FOR_SESSION_ERROR =
|
|
36
|
-
|
|
37
|
-
const
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
// Default interval for flushing logs and metrics (5 seconds)
|
|
41
|
-
const DEFAULT_FLUSH_INTERVAL = 5000;
|
|
42
|
-
|
|
34
|
+
const MISSING_RELEASE_FOR_SESSION_ERROR = "Discarded session because of missing or non-string release";
|
|
35
|
+
const INTERNAL_ERROR_SYMBOL = /* @__PURE__ */ Symbol.for("SentryInternalError");
|
|
36
|
+
const DO_NOT_SEND_EVENT_SYMBOL = /* @__PURE__ */ Symbol.for("SentryDoNotSendEventError");
|
|
37
|
+
const DEFAULT_FLUSH_INTERVAL = 5e3;
|
|
43
38
|
function _makeInternalError(message) {
|
|
44
39
|
return {
|
|
45
40
|
message,
|
|
46
|
-
[INTERNAL_ERROR_SYMBOL]: true
|
|
41
|
+
[INTERNAL_ERROR_SYMBOL]: true
|
|
47
42
|
};
|
|
48
43
|
}
|
|
49
|
-
|
|
50
44
|
function _makeDoNotSendEventError(message) {
|
|
51
45
|
return {
|
|
52
46
|
message,
|
|
53
|
-
[DO_NOT_SEND_EVENT_SYMBOL]: true
|
|
47
|
+
[DO_NOT_SEND_EVENT_SYMBOL]: true
|
|
54
48
|
};
|
|
55
49
|
}
|
|
56
|
-
|
|
57
50
|
function _isInternalError(error) {
|
|
58
|
-
return !!error && typeof error ===
|
|
51
|
+
return !!error && typeof error === "object" && INTERNAL_ERROR_SYMBOL in error;
|
|
59
52
|
}
|
|
60
|
-
|
|
61
53
|
function _isDoNotSendEventError(error) {
|
|
62
|
-
return !!error && typeof error ===
|
|
54
|
+
return !!error && typeof error === "object" && DO_NOT_SEND_EVENT_SYMBOL in error;
|
|
63
55
|
}
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Sets up weight-based flushing for logs or metrics.
|
|
67
|
-
* This helper function encapsulates the common pattern of:
|
|
68
|
-
* 1. Tracking accumulated weight of items
|
|
69
|
-
* 2. Flushing when weight exceeds threshold (800KB)
|
|
70
|
-
* 3. Flushing after timeout period from the first item
|
|
71
|
-
*
|
|
72
|
-
* Uses closure variables to track weight and timeout state.
|
|
73
|
-
*/
|
|
74
|
-
function setupWeightBasedFlushing
|
|
75
|
-
|
|
76
|
-
(
|
|
77
|
-
client,
|
|
78
|
-
afterCaptureHook,
|
|
79
|
-
flushHook,
|
|
80
|
-
estimateSizeFn,
|
|
81
|
-
flushFn,
|
|
82
|
-
) {
|
|
83
|
-
// Track weight and timeout in closure variables
|
|
56
|
+
function setupWeightBasedFlushing(client, afterCaptureHook, flushHook, estimateSizeFn, flushFn) {
|
|
84
57
|
let weight = 0;
|
|
85
58
|
let flushTimeout;
|
|
86
59
|
let isTimerActive = false;
|
|
87
|
-
|
|
88
|
-
// @ts-expect-error - TypeScript can't narrow generic hook types to match specific overloads, but we know this is type-safe
|
|
89
60
|
client.on(flushHook, () => {
|
|
90
61
|
weight = 0;
|
|
91
62
|
clearTimeout(flushTimeout);
|
|
92
63
|
isTimerActive = false;
|
|
93
64
|
});
|
|
94
|
-
|
|
95
|
-
// @ts-expect-error - TypeScript can't narrow generic hook types to match specific overloads, but we know this is type-safe
|
|
96
65
|
client.on(afterCaptureHook, (item) => {
|
|
97
66
|
weight += estimateSizeFn(item);
|
|
98
|
-
|
|
99
|
-
// We flush the buffer if it exceeds 0.8 MB
|
|
100
|
-
// The weight is a rough estimate, so we flush way before the payload gets too big.
|
|
101
|
-
if (weight >= 800000) {
|
|
67
|
+
if (weight >= 8e5) {
|
|
102
68
|
flushFn(client);
|
|
103
69
|
} else if (!isTimerActive) {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
// to avoid race conditions when new items arrive during the flush.
|
|
114
|
-
}, DEFAULT_FLUSH_INTERVAL),
|
|
115
|
-
);
|
|
70
|
+
const flushInterval = client.getOptions()._flushInterval ?? DEFAULT_FLUSH_INTERVAL;
|
|
71
|
+
if (flushInterval > 0) {
|
|
72
|
+
isTimerActive = true;
|
|
73
|
+
flushTimeout = safeUnref(
|
|
74
|
+
setTimeout(() => {
|
|
75
|
+
flushFn(client);
|
|
76
|
+
}, flushInterval)
|
|
77
|
+
);
|
|
78
|
+
}
|
|
116
79
|
}
|
|
117
80
|
});
|
|
118
|
-
|
|
119
|
-
client.on('flush', () => {
|
|
81
|
+
client.on("flush", () => {
|
|
120
82
|
flushFn(client);
|
|
121
83
|
});
|
|
122
84
|
}
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* Base implementation for all JavaScript SDK clients.
|
|
126
|
-
*
|
|
127
|
-
* Call the constructor with the corresponding options
|
|
128
|
-
* specific to the client subclass. To access these options later, use
|
|
129
|
-
* {@link Client.getOptions}.
|
|
130
|
-
*
|
|
131
|
-
* If a Dsn is specified in the options, it will be parsed and stored. Use
|
|
132
|
-
* {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is
|
|
133
|
-
* invalid, the constructor will throw a {@link SentryException}. Note that
|
|
134
|
-
* without a valid Dsn, the SDK will not send any events to Sentry.
|
|
135
|
-
*
|
|
136
|
-
* Before sending an event, it is passed through
|
|
137
|
-
* {@link Client._prepareEvent} to add SDK information and scope data
|
|
138
|
-
* (breadcrumbs and context). To add more custom information, override this
|
|
139
|
-
* method and extend the resulting prepared event.
|
|
140
|
-
*
|
|
141
|
-
* To issue automatically created events (e.g. via instrumentation), use
|
|
142
|
-
* {@link Client.captureEvent}. It will prepare the event and pass it through
|
|
143
|
-
* the callback lifecycle. To issue auto-breadcrumbs, use
|
|
144
|
-
* {@link Client.addBreadcrumb}.
|
|
145
|
-
*
|
|
146
|
-
* @example
|
|
147
|
-
* class NodeClient extends Client<NodeOptions> {
|
|
148
|
-
* public constructor(options: NodeOptions) {
|
|
149
|
-
* super(options);
|
|
150
|
-
* }
|
|
151
|
-
*
|
|
152
|
-
* // ...
|
|
153
|
-
* }
|
|
154
|
-
*/
|
|
155
85
|
class Client {
|
|
156
|
-
/** Options passed to the SDK. */
|
|
157
|
-
|
|
158
|
-
/** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */
|
|
159
|
-
|
|
160
|
-
/** Array of set up integrations. */
|
|
161
|
-
|
|
162
|
-
/** Number of calls being processed */
|
|
163
|
-
|
|
164
|
-
/** Holds flushable */
|
|
165
|
-
|
|
166
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
167
|
-
|
|
168
86
|
/**
|
|
169
87
|
* Initializes this client instance.
|
|
170
88
|
*
|
|
171
89
|
* @param options Options for the client.
|
|
172
90
|
*/
|
|
173
|
-
|
|
91
|
+
constructor(options) {
|
|
174
92
|
this._options = options;
|
|
175
93
|
this._integrations = {};
|
|
176
94
|
this._numProcessing = 0;
|
|
@@ -178,194 +96,144 @@ class Client {
|
|
|
178
96
|
this._hooks = {};
|
|
179
97
|
this._eventProcessors = [];
|
|
180
98
|
this._promiseBuffer = makePromiseBuffer(options.transportOptions?.bufferSize ?? DEFAULT_TRANSPORT_BUFFER_SIZE);
|
|
181
|
-
|
|
99
|
+
this._dataCollection = resolveDataCollectionOptions(options);
|
|
182
100
|
if (options.dsn) {
|
|
183
101
|
this._dsn = makeDsn(options.dsn);
|
|
184
102
|
} else {
|
|
185
|
-
DEBUG_BUILD && debug.warn(
|
|
103
|
+
DEBUG_BUILD && debug.warn("No DSN provided, client will not send events.");
|
|
186
104
|
}
|
|
187
|
-
|
|
188
105
|
if (this._dsn) {
|
|
189
106
|
const url = getEnvelopeEndpointWithUrlEncodedAuth(
|
|
190
107
|
this._dsn,
|
|
191
108
|
options.tunnel,
|
|
192
|
-
options._metadata ? options._metadata.sdk :
|
|
109
|
+
options._metadata ? options._metadata.sdk : void 0
|
|
193
110
|
);
|
|
194
111
|
this._transport = options.transport({
|
|
195
112
|
tunnel: this._options.tunnel,
|
|
196
113
|
recordDroppedEvent: this.recordDroppedEvent.bind(this),
|
|
197
114
|
...options.transportOptions,
|
|
198
|
-
url
|
|
115
|
+
url
|
|
199
116
|
});
|
|
200
117
|
}
|
|
201
|
-
|
|
202
|
-
// Backfill enableLogs option from _experiments.enableLogs
|
|
203
|
-
// TODO(v11): Remove or change default value
|
|
204
|
-
// eslint-disable-next-line deprecation/deprecation
|
|
205
118
|
this._options.enableLogs = this._options.enableLogs ?? this._options._experiments?.enableLogs;
|
|
206
|
-
|
|
207
|
-
// Setup log flushing with weight and timeout tracking
|
|
208
119
|
if (this._options.enableLogs) {
|
|
209
|
-
setupWeightBasedFlushing(this,
|
|
120
|
+
setupWeightBasedFlushing(this, "afterCaptureLog", "flushLogs", estimateLogSizeInBytes, _INTERNAL_flushLogsBuffer);
|
|
210
121
|
}
|
|
211
|
-
|
|
212
|
-
// todo(v11): Remove the experimental flag
|
|
213
|
-
// eslint-disable-next-line deprecation/deprecation
|
|
214
122
|
const enableMetrics = this._options.enableMetrics ?? this._options._experiments?.enableMetrics ?? true;
|
|
215
|
-
|
|
216
|
-
// Setup metric flushing with weight and timeout tracking
|
|
217
123
|
if (enableMetrics) {
|
|
218
124
|
setupWeightBasedFlushing(
|
|
219
125
|
this,
|
|
220
|
-
|
|
221
|
-
|
|
126
|
+
"afterCaptureMetric",
|
|
127
|
+
"flushMetrics",
|
|
222
128
|
estimateMetricSizeInBytes,
|
|
223
|
-
_INTERNAL_flushMetricsBuffer
|
|
129
|
+
_INTERNAL_flushMetricsBuffer
|
|
224
130
|
);
|
|
225
131
|
}
|
|
226
132
|
}
|
|
227
|
-
|
|
228
133
|
/**
|
|
229
134
|
* Captures an exception event and sends it to Sentry.
|
|
230
135
|
*
|
|
231
136
|
* Unlike `captureException` exported from every SDK, this method requires that you pass it the current scope.
|
|
232
137
|
*/
|
|
233
|
-
|
|
138
|
+
captureException(exception, hint, scope) {
|
|
234
139
|
const eventId = uuid4();
|
|
235
|
-
|
|
236
|
-
// ensure we haven't captured this very object before
|
|
237
140
|
if (checkOrSetAlreadyCaught(exception)) {
|
|
238
141
|
DEBUG_BUILD && debug.log(ALREADY_SEEN_ERROR);
|
|
239
142
|
return eventId;
|
|
240
143
|
}
|
|
241
|
-
|
|
242
144
|
const hintWithEventId = {
|
|
243
145
|
event_id: eventId,
|
|
244
|
-
...hint
|
|
146
|
+
...hint
|
|
245
147
|
};
|
|
246
|
-
|
|
247
148
|
this._process(
|
|
248
|
-
() =>
|
|
249
|
-
|
|
250
|
-
.then(event => this._captureEvent(event, hintWithEventId, scope))
|
|
251
|
-
.then(res => res),
|
|
252
|
-
'error',
|
|
149
|
+
() => this.eventFromException(exception, hintWithEventId).then((event) => this._captureEvent(event, hintWithEventId, scope)).then((res) => res),
|
|
150
|
+
"error"
|
|
253
151
|
);
|
|
254
|
-
|
|
255
152
|
return hintWithEventId.event_id;
|
|
256
153
|
}
|
|
257
|
-
|
|
258
154
|
/**
|
|
259
155
|
* Captures a message event and sends it to Sentry.
|
|
260
156
|
*
|
|
261
157
|
* Unlike `captureMessage` exported from every SDK, this method requires that you pass it the current scope.
|
|
262
158
|
*/
|
|
263
|
-
|
|
264
|
-
message,
|
|
265
|
-
level,
|
|
266
|
-
hint,
|
|
267
|
-
currentScope,
|
|
268
|
-
) {
|
|
159
|
+
captureMessage(message, level, hint, currentScope) {
|
|
269
160
|
const hintWithEventId = {
|
|
270
161
|
event_id: uuid4(),
|
|
271
|
-
...hint
|
|
162
|
+
...hint
|
|
272
163
|
};
|
|
273
|
-
|
|
274
164
|
const eventMessage = isParameterizedString(message) ? message : String(message);
|
|
275
165
|
const isMessage = isPrimitive(message);
|
|
276
|
-
const promisedEvent = isMessage
|
|
277
|
-
? this.eventFromMessage(eventMessage, level, hintWithEventId)
|
|
278
|
-
: this.eventFromException(message, hintWithEventId);
|
|
279
|
-
|
|
166
|
+
const promisedEvent = isMessage ? this.eventFromMessage(eventMessage, level, hintWithEventId) : this.eventFromException(message, hintWithEventId);
|
|
280
167
|
this._process(
|
|
281
|
-
() => promisedEvent.then(event => this._captureEvent(event, hintWithEventId, currentScope)),
|
|
282
|
-
isMessage ?
|
|
168
|
+
() => promisedEvent.then((event) => this._captureEvent(event, hintWithEventId, currentScope)),
|
|
169
|
+
isMessage ? "unknown" : "error"
|
|
283
170
|
);
|
|
284
|
-
|
|
285
171
|
return hintWithEventId.event_id;
|
|
286
172
|
}
|
|
287
|
-
|
|
288
173
|
/**
|
|
289
174
|
* Captures a manually created event and sends it to Sentry.
|
|
290
175
|
*
|
|
291
176
|
* Unlike `captureEvent` exported from every SDK, this method requires that you pass it the current scope.
|
|
292
177
|
*/
|
|
293
|
-
|
|
178
|
+
captureEvent(event, hint, currentScope) {
|
|
294
179
|
const eventId = uuid4();
|
|
295
|
-
|
|
296
|
-
// ensure we haven't captured this very object before
|
|
297
180
|
if (hint?.originalException && checkOrSetAlreadyCaught(hint.originalException)) {
|
|
298
181
|
DEBUG_BUILD && debug.log(ALREADY_SEEN_ERROR);
|
|
299
182
|
return eventId;
|
|
300
183
|
}
|
|
301
|
-
|
|
302
184
|
const hintWithEventId = {
|
|
303
185
|
event_id: eventId,
|
|
304
|
-
...hint
|
|
186
|
+
...hint
|
|
305
187
|
};
|
|
306
|
-
|
|
307
188
|
const sdkProcessingMetadata = event.sdkProcessingMetadata || {};
|
|
308
189
|
const capturedSpanScope = sdkProcessingMetadata.capturedSpanScope;
|
|
309
190
|
const capturedSpanIsolationScope = sdkProcessingMetadata.capturedSpanIsolationScope;
|
|
310
191
|
const dataCategory = getDataCategoryByType(event.type);
|
|
311
|
-
|
|
312
192
|
this._process(
|
|
313
193
|
() => this._captureEvent(event, hintWithEventId, capturedSpanScope || currentScope, capturedSpanIsolationScope),
|
|
314
|
-
dataCategory
|
|
194
|
+
dataCategory
|
|
315
195
|
);
|
|
316
|
-
|
|
317
196
|
return hintWithEventId.event_id;
|
|
318
197
|
}
|
|
319
|
-
|
|
320
198
|
/**
|
|
321
199
|
* Captures a session.
|
|
322
200
|
*/
|
|
323
|
-
|
|
201
|
+
captureSession(session) {
|
|
324
202
|
this.sendSession(session);
|
|
325
|
-
// After sending, we set init false to indicate it's not the first occurrence
|
|
326
203
|
updateSession(session, { init: false });
|
|
327
204
|
}
|
|
328
|
-
|
|
329
|
-
/**
|
|
330
|
-
* Create a cron monitor check in and send it to Sentry. This method is not available on all clients.
|
|
331
|
-
*
|
|
332
|
-
* @param checkIn An object that describes a check in.
|
|
333
|
-
* @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want
|
|
334
|
-
* to create a monitor automatically when sending a check in.
|
|
335
|
-
* @param scope An optional scope containing event metadata.
|
|
336
|
-
* @returns A string representing the id of the check in.
|
|
337
|
-
*/
|
|
338
|
-
|
|
339
205
|
/**
|
|
340
206
|
* Get the current Dsn.
|
|
341
207
|
*/
|
|
342
|
-
|
|
208
|
+
getDsn() {
|
|
343
209
|
return this._dsn;
|
|
344
210
|
}
|
|
345
|
-
|
|
346
211
|
/**
|
|
347
212
|
* Get the current options.
|
|
348
213
|
*/
|
|
349
|
-
|
|
214
|
+
getOptions() {
|
|
350
215
|
return this._options;
|
|
351
216
|
}
|
|
352
|
-
|
|
217
|
+
/**
|
|
218
|
+
* Get the resolved data collection configuration.
|
|
219
|
+
*/
|
|
220
|
+
getDataCollectionOptions() {
|
|
221
|
+
return this._dataCollection;
|
|
222
|
+
}
|
|
353
223
|
/**
|
|
354
224
|
* Get the SDK metadata.
|
|
355
225
|
* @see SdkMetadata
|
|
356
226
|
*/
|
|
357
|
-
|
|
227
|
+
getSdkMetadata() {
|
|
358
228
|
return this._options._metadata;
|
|
359
229
|
}
|
|
360
|
-
|
|
361
230
|
/**
|
|
362
231
|
* Returns the transport that is used by the client.
|
|
363
232
|
* Please note that the transport gets lazy initialized so it will only be there once the first event has been sent.
|
|
364
233
|
*/
|
|
365
|
-
|
|
234
|
+
getTransport() {
|
|
366
235
|
return this._transport;
|
|
367
236
|
}
|
|
368
|
-
|
|
369
237
|
/**
|
|
370
238
|
* Wait for all events to be sent or the timeout to expire, whichever comes first.
|
|
371
239
|
*
|
|
@@ -375,24 +243,16 @@ class Client {
|
|
|
375
243
|
* still events in the queue when the timeout is reached.
|
|
376
244
|
*/
|
|
377
245
|
// @ts-expect-error - PromiseLike is a subset of Promise
|
|
378
|
-
|
|
246
|
+
async flush(timeout) {
|
|
379
247
|
const transport = this._transport;
|
|
380
|
-
|
|
381
|
-
// Emit `flush` unconditionally so weight-based log/metric flushers drain
|
|
382
|
-
// their buffers and clear their idle timers, even when no transport is
|
|
383
|
-
// configured (e.g. no DSN).
|
|
384
|
-
this.emit('flush');
|
|
385
|
-
|
|
248
|
+
this.emit("flush");
|
|
386
249
|
if (!transport) {
|
|
387
250
|
return true;
|
|
388
251
|
}
|
|
389
|
-
|
|
390
252
|
const clientFinished = await this._isClientDoneProcessing(timeout);
|
|
391
253
|
const transportFlushed = await transport.flush(timeout);
|
|
392
|
-
|
|
393
254
|
return clientFinished && transportFlushed;
|
|
394
255
|
}
|
|
395
|
-
|
|
396
256
|
/**
|
|
397
257
|
* Flush the event queue and set the client to `enabled = false`. See {@link Client.flush}.
|
|
398
258
|
*
|
|
@@ -402,55 +262,53 @@ class Client {
|
|
|
402
262
|
* it doesn't.
|
|
403
263
|
*/
|
|
404
264
|
// @ts-expect-error - PromiseLike is a subset of Promise
|
|
405
|
-
|
|
265
|
+
async close(timeout) {
|
|
406
266
|
_INTERNAL_flushLogsBuffer(this);
|
|
407
267
|
const result = await this.flush(timeout);
|
|
408
268
|
this.getOptions().enabled = false;
|
|
409
|
-
this.emit(
|
|
269
|
+
this.emit("close");
|
|
410
270
|
return result;
|
|
411
271
|
}
|
|
412
|
-
|
|
413
272
|
/**
|
|
414
273
|
* Get all installed event processors.
|
|
415
274
|
*/
|
|
416
|
-
|
|
275
|
+
getEventProcessors() {
|
|
417
276
|
return this._eventProcessors;
|
|
418
277
|
}
|
|
419
|
-
|
|
420
278
|
/**
|
|
421
279
|
* Adds an event processor that applies to any event processed by this client.
|
|
422
280
|
*/
|
|
423
|
-
|
|
281
|
+
addEventProcessor(eventProcessor) {
|
|
424
282
|
this._eventProcessors.push(eventProcessor);
|
|
425
283
|
}
|
|
426
|
-
|
|
427
284
|
/**
|
|
428
285
|
* Initialize this client.
|
|
429
286
|
* Call this after the client was set on a scope.
|
|
430
287
|
*/
|
|
431
|
-
|
|
432
|
-
if (
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
// wouldn't get initialized with the check below when there's no DSN set.
|
|
439
|
-
this._options.integrations.some(({ name }) => name.startsWith('Spotlight'))
|
|
440
|
-
) {
|
|
288
|
+
init() {
|
|
289
|
+
if (this._isEnabled() || // Force integrations to be setup even if no DSN was set when we have
|
|
290
|
+
// Spotlight enabled. This is particularly important for browser as we
|
|
291
|
+
// don't support the `spotlight` option there and rely on the users
|
|
292
|
+
// adding the `spotlightBrowserIntegration()` to their integrations which
|
|
293
|
+
// wouldn't get initialized with the check below when there's no DSN set.
|
|
294
|
+
this._options.integrations.some(({ name }) => name.startsWith("Spotlight"))) {
|
|
441
295
|
this._setupIntegrations();
|
|
442
296
|
}
|
|
443
297
|
}
|
|
444
|
-
|
|
445
298
|
/**
|
|
446
299
|
* Gets an installed integration by its name.
|
|
447
300
|
*
|
|
448
301
|
* @returns {Integration|undefined} The installed integration or `undefined` if no integration with that `name` was installed.
|
|
449
302
|
*/
|
|
450
|
-
|
|
451
|
-
return this._integrations[integrationName]
|
|
303
|
+
getIntegrationByName(integrationName) {
|
|
304
|
+
return this._integrations[integrationName];
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Returns the names of all installed integrations.
|
|
308
|
+
*/
|
|
309
|
+
getIntegrationNames() {
|
|
310
|
+
return Object.keys(this._integrations);
|
|
452
311
|
}
|
|
453
|
-
|
|
454
312
|
/**
|
|
455
313
|
* Add an integration to the client.
|
|
456
314
|
* This can be used to e.g. lazy load integrations.
|
|
@@ -458,53 +316,37 @@ class Client {
|
|
|
458
316
|
* and you're better off just passing the integrations via `integrations: []` at initialization time.
|
|
459
317
|
* However, if you find the need to conditionally load & add an integration, you can use `addIntegration` to do so.
|
|
460
318
|
*/
|
|
461
|
-
|
|
319
|
+
addIntegration(integration) {
|
|
462
320
|
const isAlreadyInstalled = this._integrations[integration.name];
|
|
463
|
-
|
|
464
321
|
if (!isAlreadyInstalled && integration.beforeSetup) {
|
|
465
322
|
integration.beforeSetup(this);
|
|
466
323
|
}
|
|
467
|
-
|
|
468
|
-
// This hook takes care of only installing if not already installed
|
|
469
324
|
setupIntegration(this, integration, this._integrations);
|
|
470
|
-
// Here we need to check manually to make sure to not run this multiple times
|
|
471
325
|
if (!isAlreadyInstalled) {
|
|
472
326
|
afterSetupIntegrations(this, [integration]);
|
|
473
327
|
}
|
|
474
328
|
}
|
|
475
|
-
|
|
476
329
|
/**
|
|
477
330
|
* Send a fully prepared event to Sentry.
|
|
478
331
|
*/
|
|
479
|
-
|
|
480
|
-
this.emit(
|
|
481
|
-
|
|
482
|
-
// Extract gen_ai spans from transaction and convert to span v2 format.
|
|
483
|
-
// This mutates event.spans to remove the extracted spans.
|
|
332
|
+
sendEvent(event, hint = {}) {
|
|
333
|
+
this.emit("beforeSendEvent", event, hint);
|
|
484
334
|
const genAiSpanItem = extractGenAiSpansFromEvent(event, this);
|
|
485
|
-
|
|
486
335
|
let env = createEventEnvelope(event, this._dsn, this._options._metadata, this._options.tunnel);
|
|
487
|
-
|
|
488
336
|
for (const attachment of hint.attachments || []) {
|
|
489
337
|
env = addItemToEnvelope(env, createAttachmentEnvelopeItem(attachment));
|
|
490
338
|
}
|
|
491
|
-
|
|
492
339
|
if (genAiSpanItem) {
|
|
493
340
|
env = addItemToEnvelope(env, genAiSpanItem);
|
|
494
341
|
}
|
|
495
|
-
|
|
496
|
-
// sendEnvelope should not throw
|
|
497
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
498
|
-
this.sendEnvelope(env).then(sendResponse => this.emit('afterSendEvent', event, sendResponse));
|
|
342
|
+
this.sendEnvelope(env).then((sendResponse) => this.emit("afterSendEvent", event, sendResponse));
|
|
499
343
|
}
|
|
500
|
-
|
|
501
344
|
/**
|
|
502
345
|
* Send a session or session aggregrates to Sentry.
|
|
503
346
|
*/
|
|
504
|
-
|
|
505
|
-
// Backfill release and environment on session
|
|
347
|
+
sendSession(session) {
|
|
506
348
|
const { release: clientReleaseOption, environment: clientEnvironmentOption = DEFAULT_ENVIRONMENT } = this._options;
|
|
507
|
-
if (
|
|
349
|
+
if ("aggregates" in session) {
|
|
508
350
|
const sessionAttrs = session.attrs || {};
|
|
509
351
|
if (!sessionAttrs.release && !clientReleaseOption) {
|
|
510
352
|
DEBUG_BUILD && debug.warn(MISSING_RELEASE_FOR_SESSION_ERROR);
|
|
@@ -521,96 +363,57 @@ class Client {
|
|
|
521
363
|
session.release = session.release || clientReleaseOption;
|
|
522
364
|
session.environment = session.environment || clientEnvironmentOption;
|
|
523
365
|
}
|
|
524
|
-
|
|
525
|
-
this.emit('beforeSendSession', session);
|
|
526
|
-
|
|
366
|
+
this.emit("beforeSendSession", session);
|
|
527
367
|
const env = createSessionEnvelope(session, this._dsn, this._options._metadata, this._options.tunnel);
|
|
528
|
-
|
|
529
|
-
// sendEnvelope should not throw
|
|
530
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
531
368
|
this.sendEnvelope(env);
|
|
532
369
|
}
|
|
533
|
-
|
|
534
370
|
/**
|
|
535
371
|
* Record on the client that an event got dropped (ie, an event that will not be sent to Sentry).
|
|
536
372
|
*/
|
|
537
|
-
|
|
373
|
+
recordDroppedEvent(reason, category, count = 1) {
|
|
538
374
|
if (this._options.sendClientReports) {
|
|
539
|
-
// We want to track each category (error, transaction, session, replay_event) separately
|
|
540
|
-
// but still keep the distinction between different type of outcomes.
|
|
541
|
-
// We could use nested maps, but it's much easier to read and type this way.
|
|
542
|
-
// A correct type for map-based implementation if we want to go that route
|
|
543
|
-
// would be `Partial<Record<SentryRequestType, Partial<Record<Outcome, number>>>>`
|
|
544
|
-
// With typescript 4.1 we could even use template literal types
|
|
545
375
|
const key = `${reason}:${category}`;
|
|
546
|
-
DEBUG_BUILD && debug.log(`Recording outcome: "${key}"${count > 1 ? ` (${count} times)` :
|
|
376
|
+
DEBUG_BUILD && debug.log(`Recording outcome: "${key}"${count > 1 ? ` (${count} times)` : ""}`);
|
|
547
377
|
this._outcomes[key] = (this._outcomes[key] || 0) + count;
|
|
548
378
|
}
|
|
549
379
|
}
|
|
550
|
-
|
|
551
|
-
/* eslint-disable @typescript-eslint/unified-signatures */
|
|
552
|
-
/**
|
|
553
|
-
* Register a callback for whenever a span is started.
|
|
554
|
-
* Receives the span as argument.
|
|
555
|
-
* @returns {() => void} A function that, when executed, removes the registered callback.
|
|
556
|
-
*/
|
|
557
|
-
|
|
558
380
|
/**
|
|
559
381
|
* Register a hook on this client.
|
|
560
382
|
*/
|
|
561
|
-
|
|
562
|
-
const hookCallbacks =
|
|
563
|
-
|
|
564
|
-
// Wrap the callback in a function so that registering the same callback instance multiple
|
|
565
|
-
// times results in the callback being called multiple times.
|
|
566
|
-
// @ts-expect-error - The `callback` type is correct and must be a function due to the
|
|
567
|
-
// individual, specific overloads of this function.
|
|
568
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
383
|
+
on(hook, callback) {
|
|
384
|
+
const hookCallbacks = this._hooks[hook] = this._hooks[hook] || /* @__PURE__ */ new Set();
|
|
569
385
|
const uniqueCallback = (...args) => callback(...args);
|
|
570
|
-
|
|
571
386
|
hookCallbacks.add(uniqueCallback);
|
|
572
|
-
|
|
573
|
-
// This function returns a callback execution handler that, when invoked,
|
|
574
|
-
// deregisters a callback. This is crucial for managing instances where callbacks
|
|
575
|
-
// need to be unregistered to prevent self-referencing in callback closures,
|
|
576
|
-
// ensuring proper garbage collection.
|
|
577
387
|
return () => {
|
|
578
388
|
hookCallbacks.delete(uniqueCallback);
|
|
579
389
|
};
|
|
580
390
|
}
|
|
581
|
-
|
|
582
|
-
/** Fire a hook whenever a span starts. */
|
|
583
|
-
|
|
584
391
|
/**
|
|
585
392
|
* Emit a hook that was previously registered via `on()`.
|
|
586
393
|
*/
|
|
587
|
-
|
|
394
|
+
emit(hook, ...rest) {
|
|
588
395
|
const callbacks = this._hooks[hook];
|
|
589
396
|
if (callbacks) {
|
|
590
|
-
callbacks.forEach(callback => callback(...rest));
|
|
397
|
+
callbacks.forEach((callback) => callback(...rest));
|
|
591
398
|
}
|
|
592
399
|
}
|
|
593
|
-
|
|
594
400
|
/**
|
|
595
401
|
* Send an envelope to Sentry.
|
|
596
402
|
*/
|
|
597
403
|
// @ts-expect-error - PromiseLike is a subset of Promise
|
|
598
|
-
|
|
599
|
-
this.emit(
|
|
600
|
-
|
|
404
|
+
async sendEnvelope(envelope) {
|
|
405
|
+
this.emit("beforeEnvelope", envelope);
|
|
601
406
|
if (this._isEnabled() && this._transport) {
|
|
602
407
|
try {
|
|
603
408
|
return await this._transport.send(envelope);
|
|
604
409
|
} catch (reason) {
|
|
605
|
-
DEBUG_BUILD && debug.error(
|
|
410
|
+
DEBUG_BUILD && debug.error("Error while sending envelope:", reason);
|
|
606
411
|
return {};
|
|
607
412
|
}
|
|
608
413
|
}
|
|
609
|
-
|
|
610
|
-
DEBUG_BUILD && debug.error('Transport disabled');
|
|
414
|
+
DEBUG_BUILD && debug.error("Transport disabled");
|
|
611
415
|
return {};
|
|
612
416
|
}
|
|
613
|
-
|
|
614
417
|
/**
|
|
615
418
|
* Register a cleanup function to be called when the client is disposed.
|
|
616
419
|
* This is useful for integrations that need to clean up global state.
|
|
@@ -619,10 +422,8 @@ class Client {
|
|
|
619
422
|
* override this method to actually register and execute cleanup callbacks.
|
|
620
423
|
*/
|
|
621
424
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
622
|
-
|
|
623
|
-
// No-op in base class - subclasses override to implement cleanup registration
|
|
425
|
+
registerCleanup(callback) {
|
|
624
426
|
}
|
|
625
|
-
|
|
626
427
|
/**
|
|
627
428
|
* Disposes of the client and releases all resources.
|
|
628
429
|
*
|
|
@@ -632,31 +433,23 @@ class Client {
|
|
|
632
433
|
*
|
|
633
434
|
* After calling dispose(), the client should not be used anymore.
|
|
634
435
|
*/
|
|
635
|
-
|
|
636
|
-
// Base class has no cleanup logic - subclasses implement their own
|
|
436
|
+
dispose() {
|
|
637
437
|
}
|
|
638
|
-
|
|
639
438
|
/* eslint-enable @typescript-eslint/unified-signatures */
|
|
640
|
-
|
|
641
439
|
/** Setup integrations for this client. */
|
|
642
|
-
|
|
440
|
+
_setupIntegrations() {
|
|
643
441
|
const { integrations } = this._options;
|
|
644
442
|
this._integrations = setupIntegrations(this, integrations);
|
|
645
443
|
afterSetupIntegrations(this, integrations);
|
|
646
444
|
}
|
|
647
|
-
|
|
648
445
|
/** Updates existing session based on the provided event */
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
let crashed = event.level === 'fatal';
|
|
446
|
+
_updateSessionFromEvent(session, event) {
|
|
447
|
+
let crashed = event.level === "fatal";
|
|
652
448
|
let errored = false;
|
|
653
449
|
const exceptions = event.exception?.values;
|
|
654
|
-
|
|
655
450
|
if (exceptions) {
|
|
656
451
|
errored = true;
|
|
657
|
-
// reset crashed to false if there are exceptions, to ensure `mechanism.handled` is respected.
|
|
658
452
|
crashed = false;
|
|
659
|
-
|
|
660
453
|
for (const ex of exceptions) {
|
|
661
454
|
if (ex.mechanism?.handled === false) {
|
|
662
455
|
crashed = true;
|
|
@@ -664,22 +457,16 @@ class Client {
|
|
|
664
457
|
}
|
|
665
458
|
}
|
|
666
459
|
}
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
// 1. Session with non terminal status and 0 errors + an error occurred -> Will set error count to 1 and send update
|
|
670
|
-
// 2. Session with non terminal status and 1 error + a crash occurred -> Will set status crashed and send update
|
|
671
|
-
const sessionNonTerminal = session.status === 'ok';
|
|
672
|
-
const shouldUpdateAndSend = (sessionNonTerminal && session.errors === 0) || (sessionNonTerminal && crashed);
|
|
673
|
-
|
|
460
|
+
const sessionNonTerminal = session.status === "ok";
|
|
461
|
+
const shouldUpdateAndSend = sessionNonTerminal && session.errors === 0 || sessionNonTerminal && crashed;
|
|
674
462
|
if (shouldUpdateAndSend) {
|
|
675
463
|
updateSession(session, {
|
|
676
|
-
...
|
|
677
|
-
errors: session.errors || Number(errored || crashed)
|
|
464
|
+
...crashed && { status: "crashed" },
|
|
465
|
+
errors: session.errors || Number(errored || crashed)
|
|
678
466
|
});
|
|
679
467
|
this.captureSession(session);
|
|
680
468
|
}
|
|
681
469
|
}
|
|
682
|
-
|
|
683
470
|
/**
|
|
684
471
|
* Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying
|
|
685
472
|
* "no" (resolving to `false`) in order to give the client a chance to potentially finish first.
|
|
@@ -690,26 +477,21 @@ class Client {
|
|
|
690
477
|
* @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and
|
|
691
478
|
* `false` otherwise
|
|
692
479
|
*/
|
|
693
|
-
|
|
480
|
+
async _isClientDoneProcessing(timeout) {
|
|
694
481
|
let ticked = 0;
|
|
695
|
-
|
|
696
482
|
while (!timeout || ticked < timeout) {
|
|
697
|
-
await new Promise(resolve => setTimeout(resolve, 1));
|
|
698
|
-
|
|
483
|
+
await new Promise((resolve) => setTimeout(resolve, 1));
|
|
699
484
|
if (!this._numProcessing) {
|
|
700
485
|
return true;
|
|
701
486
|
}
|
|
702
487
|
ticked++;
|
|
703
488
|
}
|
|
704
|
-
|
|
705
489
|
return false;
|
|
706
490
|
}
|
|
707
|
-
|
|
708
491
|
/** Determines whether this SDK is enabled and a transport is present. */
|
|
709
|
-
|
|
710
|
-
return this.getOptions().enabled !== false && this._transport !==
|
|
492
|
+
_isEnabled() {
|
|
493
|
+
return this.getOptions().enabled !== false && this._transport !== void 0;
|
|
711
494
|
}
|
|
712
|
-
|
|
713
495
|
/**
|
|
714
496
|
* Adds common information to events.
|
|
715
497
|
*
|
|
@@ -724,68 +506,48 @@ class Client {
|
|
|
724
506
|
* @param currentScope A scope containing event metadata.
|
|
725
507
|
* @returns A new event with more information.
|
|
726
508
|
*/
|
|
727
|
-
|
|
728
|
-
event,
|
|
729
|
-
hint,
|
|
730
|
-
currentScope,
|
|
731
|
-
isolationScope,
|
|
732
|
-
) {
|
|
509
|
+
_prepareEvent(event, hint, currentScope, isolationScope) {
|
|
733
510
|
const options = this.getOptions();
|
|
734
|
-
const integrations =
|
|
735
|
-
if (!hint.integrations && integrations
|
|
511
|
+
const integrations = this.getIntegrationNames();
|
|
512
|
+
if (!hint.integrations && integrations.length) {
|
|
736
513
|
hint.integrations = integrations;
|
|
737
514
|
}
|
|
738
|
-
|
|
739
|
-
this.emit('preprocessEvent', event, hint);
|
|
740
|
-
|
|
515
|
+
this.emit("preprocessEvent", event, hint);
|
|
741
516
|
if (!event.type) {
|
|
742
517
|
isolationScope.setLastEventId(event.event_id || hint.event_id);
|
|
743
518
|
}
|
|
744
|
-
|
|
745
|
-
return prepareEvent(options, event, hint, currentScope, this, isolationScope).then(evt => {
|
|
519
|
+
return prepareEvent(options, event, hint, currentScope, this, isolationScope).then((evt) => {
|
|
746
520
|
if (evt === null) {
|
|
747
521
|
return evt;
|
|
748
522
|
}
|
|
749
|
-
|
|
750
|
-
this.emit('postprocessEvent', evt, hint);
|
|
751
|
-
|
|
523
|
+
this.emit("postprocessEvent", evt, hint);
|
|
752
524
|
evt.contexts = {
|
|
753
525
|
trace: { ...evt.contexts?.trace, ...getTraceContextFromScope(currentScope) },
|
|
754
|
-
...evt.contexts
|
|
526
|
+
...evt.contexts
|
|
755
527
|
};
|
|
756
|
-
|
|
757
528
|
const dynamicSamplingContext = getDynamicSamplingContextFromScope(this, currentScope);
|
|
758
|
-
|
|
759
529
|
evt.sdkProcessingMetadata = {
|
|
760
530
|
dynamicSamplingContext,
|
|
761
|
-
...evt.sdkProcessingMetadata
|
|
531
|
+
...evt.sdkProcessingMetadata
|
|
762
532
|
};
|
|
763
|
-
|
|
764
533
|
return evt;
|
|
765
534
|
});
|
|
766
535
|
}
|
|
767
|
-
|
|
768
536
|
/**
|
|
769
537
|
* Processes the event and logs an error in case of rejection
|
|
770
538
|
* @param event
|
|
771
539
|
* @param hint
|
|
772
540
|
* @param scope
|
|
773
541
|
*/
|
|
774
|
-
|
|
775
|
-
event,
|
|
776
|
-
hint = {},
|
|
777
|
-
currentScope = getCurrentScope(),
|
|
778
|
-
isolationScope = getIsolationScope(),
|
|
779
|
-
) {
|
|
542
|
+
_captureEvent(event, hint = {}, currentScope = getCurrentScope(), isolationScope = getIsolationScope()) {
|
|
780
543
|
if (DEBUG_BUILD && isErrorEvent(event)) {
|
|
781
|
-
debug.log(`Captured error event \`${getPossibleEventMessages(event)[0] ||
|
|
544
|
+
debug.log(`Captured error event \`${getPossibleEventMessages(event)[0] || "<unknown>"}\``);
|
|
782
545
|
}
|
|
783
|
-
|
|
784
546
|
return this._processEvent(event, hint, currentScope, isolationScope).then(
|
|
785
|
-
finalEvent => {
|
|
547
|
+
(finalEvent) => {
|
|
786
548
|
return finalEvent.event_id;
|
|
787
549
|
},
|
|
788
|
-
reason => {
|
|
550
|
+
(reason) => {
|
|
789
551
|
if (DEBUG_BUILD) {
|
|
790
552
|
if (_isDoNotSendEventError(reason)) {
|
|
791
553
|
debug.log(reason.message);
|
|
@@ -795,11 +557,10 @@ class Client {
|
|
|
795
557
|
debug.warn(reason);
|
|
796
558
|
}
|
|
797
559
|
}
|
|
798
|
-
return
|
|
799
|
-
}
|
|
560
|
+
return void 0;
|
|
561
|
+
}
|
|
800
562
|
);
|
|
801
563
|
}
|
|
802
|
-
|
|
803
564
|
/**
|
|
804
565
|
* Processes an event (either error or message) and sends it to Sentry.
|
|
805
566
|
*
|
|
@@ -813,280 +574,193 @@ class Client {
|
|
|
813
574
|
* @param currentScope A scope containing event metadata.
|
|
814
575
|
* @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.
|
|
815
576
|
*/
|
|
816
|
-
|
|
817
|
-
event,
|
|
818
|
-
hint,
|
|
819
|
-
currentScope,
|
|
820
|
-
isolationScope,
|
|
821
|
-
) {
|
|
577
|
+
_processEvent(event, hint, currentScope, isolationScope) {
|
|
822
578
|
const options = this.getOptions();
|
|
823
579
|
const { sampleRate } = options;
|
|
824
|
-
|
|
825
580
|
const isTransaction = isTransactionEvent(event);
|
|
826
581
|
const isError = isErrorEvent(event);
|
|
827
|
-
const eventType = event.type ||
|
|
582
|
+
const eventType = event.type || "error";
|
|
828
583
|
const beforeSendLabel = `before send for type \`${eventType}\``;
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
// Sampling for transaction happens somewhere else
|
|
833
|
-
const parsedSampleRate = typeof sampleRate === 'undefined' ? undefined : parseSampleRate(sampleRate);
|
|
834
|
-
if (isError && typeof parsedSampleRate === 'number' && safeMathRandom() > parsedSampleRate) {
|
|
835
|
-
this.recordDroppedEvent('sample_rate', 'error');
|
|
584
|
+
const parsedSampleRate = typeof sampleRate === "undefined" ? void 0 : parseSampleRate(sampleRate);
|
|
585
|
+
if (isError && typeof parsedSampleRate === "number" && safeMathRandom() > parsedSampleRate) {
|
|
586
|
+
this.recordDroppedEvent("sample_rate", "error");
|
|
836
587
|
return rejectedSyncPromise(
|
|
837
588
|
_makeDoNotSendEventError(
|
|
838
|
-
`Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})
|
|
839
|
-
)
|
|
589
|
+
`Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`
|
|
590
|
+
)
|
|
840
591
|
);
|
|
841
592
|
}
|
|
842
|
-
|
|
843
593
|
const dataCategory = getDataCategoryByType(event.type);
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
return _validateBeforeSendResult(result, beforeSendLabel);
|
|
859
|
-
})
|
|
860
|
-
.then(processedEvent => {
|
|
861
|
-
if (processedEvent === null) {
|
|
862
|
-
this.recordDroppedEvent('before_send', dataCategory);
|
|
863
|
-
if (isTransaction) {
|
|
864
|
-
const spans = event.spans || [];
|
|
865
|
-
// the transaction itself counts as one span, plus all the child spans that are added
|
|
866
|
-
const spanCount = 1 + spans.length;
|
|
867
|
-
this.recordDroppedEvent('before_send', 'span', spanCount);
|
|
868
|
-
}
|
|
869
|
-
throw _makeDoNotSendEventError(`${beforeSendLabel} returned \`null\`, will not send event.`);
|
|
870
|
-
}
|
|
871
|
-
|
|
872
|
-
const session = currentScope.getSession() || isolationScope.getSession();
|
|
873
|
-
if (isError && session) {
|
|
874
|
-
this._updateSessionFromEvent(session, processedEvent);
|
|
875
|
-
}
|
|
876
|
-
|
|
594
|
+
return this._prepareEvent(event, hint, currentScope, isolationScope).then((prepared) => {
|
|
595
|
+
if (prepared === null) {
|
|
596
|
+
this.recordDroppedEvent("event_processor", dataCategory);
|
|
597
|
+
throw _makeDoNotSendEventError("An event processor returned `null`, will not send event.");
|
|
598
|
+
}
|
|
599
|
+
const isInternalException = hint.data?.__sentry__ === true;
|
|
600
|
+
if (isInternalException) {
|
|
601
|
+
return prepared;
|
|
602
|
+
}
|
|
603
|
+
const result = processBeforeSend(this, options, prepared, hint);
|
|
604
|
+
return _validateBeforeSendResult(result, beforeSendLabel);
|
|
605
|
+
}).then((processedEvent) => {
|
|
606
|
+
if (processedEvent === null) {
|
|
607
|
+
this.recordDroppedEvent("before_send", dataCategory);
|
|
877
608
|
if (isTransaction) {
|
|
878
|
-
const
|
|
879
|
-
const
|
|
880
|
-
|
|
881
|
-
const droppedSpanCount = spanCountBefore - spanCountAfter;
|
|
882
|
-
if (droppedSpanCount > 0) {
|
|
883
|
-
this.recordDroppedEvent('before_send', 'span', droppedSpanCount);
|
|
884
|
-
}
|
|
885
|
-
}
|
|
886
|
-
|
|
887
|
-
// None of the Sentry built event processor will update transaction name,
|
|
888
|
-
// so if the transaction name has been changed by an event processor, we know
|
|
889
|
-
// it has to come from custom event processor added by a user
|
|
890
|
-
const transactionInfo = processedEvent.transaction_info;
|
|
891
|
-
if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) {
|
|
892
|
-
const source = 'custom';
|
|
893
|
-
processedEvent.transaction_info = {
|
|
894
|
-
...transactionInfo,
|
|
895
|
-
source,
|
|
896
|
-
};
|
|
609
|
+
const spans = event.spans || [];
|
|
610
|
+
const spanCount = 1 + spans.length;
|
|
611
|
+
this.recordDroppedEvent("before_send", "span", spanCount);
|
|
897
612
|
}
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
613
|
+
throw _makeDoNotSendEventError(`${beforeSendLabel} returned \`null\`, will not send event.`);
|
|
614
|
+
}
|
|
615
|
+
const session = currentScope.getSession() || isolationScope.getSession();
|
|
616
|
+
if (isError && session) {
|
|
617
|
+
this._updateSessionFromEvent(session, processedEvent);
|
|
618
|
+
}
|
|
619
|
+
if (isTransaction) {
|
|
620
|
+
const spanCountBefore = processedEvent.sdkProcessingMetadata?.spanCountBeforeProcessing || 0;
|
|
621
|
+
const spanCountAfter = processedEvent.spans ? processedEvent.spans.length : 0;
|
|
622
|
+
const droppedSpanCount = spanCountBefore - spanCountAfter;
|
|
623
|
+
if (droppedSpanCount > 0) {
|
|
624
|
+
this.recordDroppedEvent("before_send", "span", droppedSpanCount);
|
|
905
625
|
}
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
626
|
+
}
|
|
627
|
+
const transactionInfo = processedEvent.transaction_info;
|
|
628
|
+
if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) {
|
|
629
|
+
const source = "custom";
|
|
630
|
+
processedEvent.transaction_info = {
|
|
631
|
+
...transactionInfo,
|
|
632
|
+
source
|
|
633
|
+
};
|
|
634
|
+
}
|
|
635
|
+
this.sendEvent(processedEvent, hint);
|
|
636
|
+
return processedEvent;
|
|
637
|
+
}).then(null, (reason) => {
|
|
638
|
+
if (_isDoNotSendEventError(reason) || _isInternalError(reason)) {
|
|
639
|
+
throw reason;
|
|
640
|
+
}
|
|
641
|
+
this.captureException(reason, {
|
|
642
|
+
mechanism: {
|
|
643
|
+
handled: false,
|
|
644
|
+
type: "internal"
|
|
645
|
+
},
|
|
646
|
+
data: {
|
|
647
|
+
__sentry__: true
|
|
648
|
+
},
|
|
649
|
+
originalException: reason
|
|
920
650
|
});
|
|
651
|
+
throw _makeInternalError(
|
|
652
|
+
`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
653
|
+
Reason: ${reason}`
|
|
654
|
+
);
|
|
655
|
+
});
|
|
921
656
|
}
|
|
922
|
-
|
|
923
657
|
/**
|
|
924
658
|
* Occupies the client with processing and event
|
|
925
659
|
*/
|
|
926
|
-
|
|
660
|
+
_process(taskProducer, dataCategory) {
|
|
927
661
|
this._numProcessing++;
|
|
928
|
-
|
|
929
662
|
void this._promiseBuffer.add(taskProducer).then(
|
|
930
|
-
value => {
|
|
663
|
+
(value) => {
|
|
931
664
|
this._numProcessing--;
|
|
932
665
|
return value;
|
|
933
666
|
},
|
|
934
|
-
reason => {
|
|
667
|
+
(reason) => {
|
|
935
668
|
this._numProcessing--;
|
|
936
|
-
|
|
937
669
|
if (reason === SENTRY_BUFFER_FULL_ERROR) {
|
|
938
|
-
this.recordDroppedEvent(
|
|
670
|
+
this.recordDroppedEvent("queue_overflow", dataCategory);
|
|
939
671
|
}
|
|
940
|
-
|
|
941
672
|
return reason;
|
|
942
|
-
}
|
|
673
|
+
}
|
|
943
674
|
);
|
|
944
675
|
}
|
|
945
|
-
|
|
946
676
|
/**
|
|
947
677
|
* Clears outcomes on this client and returns them.
|
|
948
678
|
*/
|
|
949
|
-
|
|
679
|
+
_clearOutcomes() {
|
|
950
680
|
const outcomes = this._outcomes;
|
|
951
681
|
this._outcomes = {};
|
|
952
682
|
return Object.entries(outcomes).map(([key, quantity]) => {
|
|
953
|
-
const [reason, category] = key.split(
|
|
683
|
+
const [reason, category] = key.split(":");
|
|
954
684
|
return {
|
|
955
685
|
reason,
|
|
956
686
|
category,
|
|
957
|
-
quantity
|
|
687
|
+
quantity
|
|
958
688
|
};
|
|
959
689
|
});
|
|
960
690
|
}
|
|
961
|
-
|
|
962
691
|
/**
|
|
963
692
|
* Sends client reports as an envelope.
|
|
964
693
|
*/
|
|
965
|
-
|
|
966
|
-
DEBUG_BUILD && debug.log(
|
|
967
|
-
|
|
694
|
+
_flushOutcomes() {
|
|
695
|
+
DEBUG_BUILD && debug.log("Flushing outcomes...");
|
|
968
696
|
const outcomes = this._clearOutcomes();
|
|
969
|
-
|
|
970
697
|
if (outcomes.length === 0) {
|
|
971
|
-
DEBUG_BUILD && debug.log(
|
|
698
|
+
DEBUG_BUILD && debug.log("No outcomes to send");
|
|
972
699
|
return;
|
|
973
700
|
}
|
|
974
|
-
|
|
975
|
-
// This is really the only place where we want to check for a DSN and only send outcomes then
|
|
976
701
|
if (!this._dsn) {
|
|
977
|
-
DEBUG_BUILD && debug.log(
|
|
702
|
+
DEBUG_BUILD && debug.log("No dsn provided, will not send outcomes");
|
|
978
703
|
return;
|
|
979
704
|
}
|
|
980
|
-
|
|
981
|
-
DEBUG_BUILD && debug.log('Sending outcomes:', outcomes);
|
|
982
|
-
|
|
705
|
+
DEBUG_BUILD && debug.log("Sending outcomes:", outcomes);
|
|
983
706
|
const envelope = createClientReportEnvelope(outcomes, this._options.tunnel && dsnToString(this._dsn));
|
|
984
|
-
|
|
985
|
-
// sendEnvelope should not throw
|
|
986
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
987
707
|
this.sendEnvelope(envelope);
|
|
988
708
|
}
|
|
989
|
-
|
|
990
|
-
/**
|
|
991
|
-
* Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.
|
|
992
|
-
*/
|
|
993
|
-
|
|
994
709
|
}
|
|
995
|
-
|
|
996
710
|
function getDataCategoryByType(type) {
|
|
997
|
-
return type ===
|
|
711
|
+
return type === "replay_event" ? "replay" : type || "error";
|
|
998
712
|
}
|
|
999
|
-
|
|
1000
|
-
/**
|
|
1001
|
-
* Verifies that return value of configured `beforeSend` or `beforeSendTransaction` is of expected type, and returns the value if so.
|
|
1002
|
-
*/
|
|
1003
|
-
function _validateBeforeSendResult(
|
|
1004
|
-
beforeSendResult,
|
|
1005
|
-
beforeSendLabel,
|
|
1006
|
-
) {
|
|
713
|
+
function _validateBeforeSendResult(beforeSendResult, beforeSendLabel) {
|
|
1007
714
|
const invalidValueError = `${beforeSendLabel} must return \`null\` or a valid event.`;
|
|
1008
715
|
if (isThenable(beforeSendResult)) {
|
|
1009
716
|
return beforeSendResult.then(
|
|
1010
|
-
event => {
|
|
717
|
+
(event) => {
|
|
1011
718
|
if (!isPlainObject(event) && event !== null) {
|
|
1012
719
|
throw _makeInternalError(invalidValueError);
|
|
1013
720
|
}
|
|
1014
721
|
return event;
|
|
1015
722
|
},
|
|
1016
|
-
e => {
|
|
723
|
+
(e) => {
|
|
1017
724
|
throw _makeInternalError(`${beforeSendLabel} rejected with ${e}`);
|
|
1018
|
-
}
|
|
725
|
+
}
|
|
1019
726
|
);
|
|
1020
727
|
} else if (!isPlainObject(beforeSendResult) && beforeSendResult !== null) {
|
|
1021
728
|
throw _makeInternalError(invalidValueError);
|
|
1022
729
|
}
|
|
1023
730
|
return beforeSendResult;
|
|
1024
731
|
}
|
|
1025
|
-
|
|
1026
|
-
/**
|
|
1027
|
-
* Process the matching `beforeSendXXX` callback.
|
|
1028
|
-
*/
|
|
1029
|
-
function processBeforeSend(
|
|
1030
|
-
client,
|
|
1031
|
-
options,
|
|
1032
|
-
event,
|
|
1033
|
-
hint,
|
|
1034
|
-
) {
|
|
732
|
+
function processBeforeSend(client, options, event, hint) {
|
|
1035
733
|
const { beforeSend, beforeSendTransaction, ignoreSpans } = options;
|
|
1036
734
|
const beforeSendSpan = !isStreamedBeforeSendSpanCallback(options.beforeSendSpan) && options.beforeSendSpan;
|
|
1037
|
-
|
|
1038
735
|
let processedEvent = event;
|
|
1039
|
-
|
|
1040
736
|
if (isErrorEvent(processedEvent) && beforeSend) {
|
|
1041
737
|
return beforeSend(processedEvent, hint);
|
|
1042
738
|
}
|
|
1043
|
-
|
|
1044
739
|
if (isTransactionEvent(processedEvent)) {
|
|
1045
|
-
// Avoid processing if we don't have to
|
|
1046
740
|
if (beforeSendSpan || ignoreSpans) {
|
|
1047
|
-
// 1. Process root span
|
|
1048
741
|
const rootSpanJson = convertTransactionEventToSpanJson(processedEvent);
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
shouldIgnoreSpan(
|
|
1054
|
-
{ description: rootSpanJson.description, op: rootSpanJson.op, attributes: rootSpanJson.data },
|
|
1055
|
-
ignoreSpans,
|
|
1056
|
-
)
|
|
1057
|
-
) {
|
|
1058
|
-
// dropping the whole transaction!
|
|
742
|
+
if (ignoreSpans?.length && shouldIgnoreSpan(
|
|
743
|
+
{ description: rootSpanJson.description, op: rootSpanJson.op, attributes: rootSpanJson.data },
|
|
744
|
+
ignoreSpans
|
|
745
|
+
)) {
|
|
1059
746
|
return null;
|
|
1060
747
|
}
|
|
1061
|
-
|
|
1062
|
-
// 1.2 If a `beforeSendSpan` callback is defined, process the root span
|
|
1063
748
|
if (beforeSendSpan) {
|
|
1064
749
|
const processedRootSpanJson = beforeSendSpan(rootSpanJson);
|
|
1065
750
|
if (!processedRootSpanJson) {
|
|
1066
751
|
showSpanDropWarning();
|
|
1067
752
|
} else {
|
|
1068
|
-
// update event with processed root span values
|
|
1069
753
|
processedEvent = merge(event, convertSpanJsonToTransactionEvent(processedRootSpanJson));
|
|
1070
754
|
}
|
|
1071
755
|
}
|
|
1072
|
-
|
|
1073
|
-
// 2. Process child spans
|
|
1074
756
|
if (processedEvent.spans) {
|
|
1075
757
|
const processedSpans = [];
|
|
1076
|
-
|
|
1077
758
|
const initialSpans = processedEvent.spans;
|
|
1078
|
-
|
|
1079
759
|
for (const span of initialSpans) {
|
|
1080
|
-
|
|
1081
|
-
if (
|
|
1082
|
-
ignoreSpans?.length &&
|
|
1083
|
-
shouldIgnoreSpan({ description: span.description, op: span.op, attributes: span.data }, ignoreSpans)
|
|
1084
|
-
) {
|
|
760
|
+
if (ignoreSpans?.length && shouldIgnoreSpan({ description: span.description, op: span.op, attributes: span.data }, ignoreSpans)) {
|
|
1085
761
|
reparentChildSpans(initialSpans, span);
|
|
1086
762
|
continue;
|
|
1087
763
|
}
|
|
1088
|
-
|
|
1089
|
-
// 2.b If a `beforeSendSpan` callback is defined, process the child span
|
|
1090
764
|
if (beforeSendSpan) {
|
|
1091
765
|
const processedSpan = beforeSendSpan(span);
|
|
1092
766
|
if (!processedSpan) {
|
|
@@ -1099,114 +773,71 @@ function processBeforeSend(
|
|
|
1099
773
|
processedSpans.push(span);
|
|
1100
774
|
}
|
|
1101
775
|
}
|
|
1102
|
-
|
|
1103
776
|
const droppedSpans = processedEvent.spans.length - processedSpans.length;
|
|
1104
777
|
if (droppedSpans) {
|
|
1105
|
-
client.recordDroppedEvent(
|
|
778
|
+
client.recordDroppedEvent("before_send", "span", droppedSpans);
|
|
1106
779
|
}
|
|
1107
|
-
|
|
1108
780
|
processedEvent.spans = processedSpans;
|
|
1109
781
|
}
|
|
1110
782
|
}
|
|
1111
|
-
|
|
1112
783
|
if (beforeSendTransaction) {
|
|
1113
784
|
if (processedEvent.spans) {
|
|
1114
|
-
// We store the # of spans before processing in SDK metadata,
|
|
1115
|
-
// so we can compare it afterwards to determine how many spans were dropped
|
|
1116
785
|
const spanCountBefore = processedEvent.spans.length;
|
|
1117
786
|
processedEvent.sdkProcessingMetadata = {
|
|
1118
787
|
...event.sdkProcessingMetadata,
|
|
1119
|
-
spanCountBeforeProcessing: spanCountBefore
|
|
788
|
+
spanCountBeforeProcessing: spanCountBefore
|
|
1120
789
|
};
|
|
1121
790
|
}
|
|
1122
|
-
return beforeSendTransaction(processedEvent
|
|
791
|
+
return beforeSendTransaction(processedEvent, hint);
|
|
1123
792
|
}
|
|
1124
793
|
}
|
|
1125
|
-
|
|
1126
794
|
return processedEvent;
|
|
1127
795
|
}
|
|
1128
|
-
|
|
1129
796
|
function isErrorEvent(event) {
|
|
1130
|
-
return event.type ===
|
|
797
|
+
return event.type === void 0;
|
|
1131
798
|
}
|
|
1132
|
-
|
|
1133
799
|
function isTransactionEvent(event) {
|
|
1134
|
-
return event.type ===
|
|
800
|
+
return event.type === "transaction";
|
|
1135
801
|
}
|
|
1136
|
-
|
|
1137
|
-
/**
|
|
1138
|
-
* Estimate the size of a metric in bytes.
|
|
1139
|
-
*
|
|
1140
|
-
* @param metric - The metric to estimate the size of.
|
|
1141
|
-
* @returns The estimated size of the metric in bytes.
|
|
1142
|
-
*/
|
|
1143
802
|
function estimateMetricSizeInBytes(metric) {
|
|
1144
803
|
let weight = 0;
|
|
1145
|
-
|
|
1146
|
-
// Estimate byte size of 2 bytes per character. This is a rough estimate JS strings are stored as UTF-16.
|
|
1147
804
|
if (metric.name) {
|
|
1148
805
|
weight += metric.name.length * 2;
|
|
1149
806
|
}
|
|
1150
|
-
|
|
1151
|
-
// Add weight for number
|
|
1152
807
|
weight += 8;
|
|
1153
|
-
|
|
1154
808
|
return weight + estimateAttributesSizeInBytes(metric.attributes);
|
|
1155
809
|
}
|
|
1156
|
-
|
|
1157
|
-
/**
|
|
1158
|
-
* Estimate the size of a log in bytes.
|
|
1159
|
-
*
|
|
1160
|
-
* @param log - The log to estimate the size of.
|
|
1161
|
-
* @returns The estimated size of the log in bytes.
|
|
1162
|
-
*/
|
|
1163
810
|
function estimateLogSizeInBytes(log) {
|
|
1164
811
|
let weight = 0;
|
|
1165
|
-
|
|
1166
|
-
// Estimate byte size of 2 bytes per character. This is a rough estimate JS strings are stored as UTF-16.
|
|
1167
812
|
if (log.message) {
|
|
1168
813
|
weight += log.message.length * 2;
|
|
1169
814
|
}
|
|
1170
|
-
|
|
1171
815
|
return weight + estimateAttributesSizeInBytes(log.attributes);
|
|
1172
816
|
}
|
|
1173
|
-
|
|
1174
|
-
/**
|
|
1175
|
-
* Estimate the size of attributes in bytes.
|
|
1176
|
-
*
|
|
1177
|
-
* @param attributes - The attributes object to estimate the size of.
|
|
1178
|
-
* @returns The estimated size of the attributes in bytes.
|
|
1179
|
-
*/
|
|
1180
817
|
function estimateAttributesSizeInBytes(attributes) {
|
|
1181
818
|
if (!attributes) {
|
|
1182
819
|
return 0;
|
|
1183
820
|
}
|
|
1184
|
-
|
|
1185
821
|
let weight = 0;
|
|
1186
|
-
|
|
1187
|
-
Object.values(attributes).forEach(value => {
|
|
822
|
+
Object.values(attributes).forEach((value) => {
|
|
1188
823
|
if (Array.isArray(value)) {
|
|
1189
824
|
weight += value.length * estimatePrimitiveSizeInBytes(value[0]);
|
|
1190
825
|
} else if (isPrimitive(value)) {
|
|
1191
826
|
weight += estimatePrimitiveSizeInBytes(value);
|
|
1192
827
|
} else {
|
|
1193
|
-
// For objects values, we estimate the size of the object as 100 bytes
|
|
1194
828
|
weight += 100;
|
|
1195
829
|
}
|
|
1196
830
|
});
|
|
1197
|
-
|
|
1198
831
|
return weight;
|
|
1199
832
|
}
|
|
1200
|
-
|
|
1201
833
|
function estimatePrimitiveSizeInBytes(value) {
|
|
1202
|
-
if (typeof value ===
|
|
834
|
+
if (typeof value === "string") {
|
|
1203
835
|
return value.length * 2;
|
|
1204
|
-
} else if (typeof value ===
|
|
836
|
+
} else if (typeof value === "number") {
|
|
1205
837
|
return 8;
|
|
1206
|
-
} else if (typeof value ===
|
|
838
|
+
} else if (typeof value === "boolean") {
|
|
1207
839
|
return 4;
|
|
1208
840
|
}
|
|
1209
|
-
|
|
1210
841
|
return 0;
|
|
1211
842
|
}
|
|
1212
843
|
|