@sentry/core 10.52.0 → 10.53.1
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/browser.d.ts +4 -0
- package/browser.js +3 -0
- package/build/cjs/browser.js +529 -0
- package/build/cjs/browser.js.map +1 -0
- package/build/cjs/client.js +9 -0
- package/build/cjs/client.js.map +1 -1
- package/build/cjs/index.js +69 -68
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/instrument/console.js +43 -3
- package/build/cjs/instrument/console.js.map +1 -1
- package/build/cjs/integrations/captureconsole.js +2 -2
- package/build/cjs/integrations/captureconsole.js.map +1 -1
- package/build/cjs/integrations/console.js +5 -1
- package/build/cjs/integrations/console.js.map +1 -1
- package/build/cjs/integrations/express/index.js +2 -2
- package/build/cjs/integrations/express/index.js.map +1 -1
- package/build/cjs/integrations/mcp-server/errorCapture.js +2 -2
- package/build/cjs/integrations/mcp-server/errorCapture.js.map +1 -1
- package/build/cjs/integrations/mcp-server/handlers.js +72 -0
- package/build/cjs/integrations/mcp-server/handlers.js.map +1 -1
- package/build/cjs/integrations/mcp-server/index.js +10 -1
- package/build/cjs/integrations/mcp-server/index.js.map +1 -1
- package/build/cjs/integrations/supabase.js +4 -4
- package/build/cjs/integrations/supabase.js.map +1 -1
- package/build/cjs/semanticAttributes.js +4 -4
- package/build/cjs/semanticAttributes.js.map +1 -1
- package/build/cjs/server.js +563 -0
- package/build/cjs/server.js.map +1 -0
- package/build/cjs/tracing/ai/utils.js +2 -2
- package/build/cjs/tracing/ai/utils.js.map +1 -1
- package/build/cjs/tracing/anthropic-ai/index.js +3 -3
- package/build/cjs/tracing/anthropic-ai/index.js.map +1 -1
- package/build/cjs/tracing/anthropic-ai/streaming.js +3 -3
- package/build/cjs/tracing/anthropic-ai/streaming.js.map +1 -1
- package/build/cjs/tracing/anthropic-ai/utils.js +2 -2
- package/build/cjs/tracing/anthropic-ai/utils.js.map +1 -1
- package/build/cjs/tracing/google-genai/index.js +3 -3
- package/build/cjs/tracing/google-genai/index.js.map +1 -1
- package/build/cjs/tracing/google-genai/streaming.js +2 -2
- package/build/cjs/tracing/google-genai/streaming.js.map +1 -1
- package/build/cjs/tracing/langchain/embeddings.js +2 -2
- package/build/cjs/tracing/langchain/embeddings.js.map +1 -1
- package/build/cjs/tracing/langchain/index.js +4 -4
- package/build/cjs/tracing/langchain/index.js.map +1 -1
- package/build/cjs/tracing/langgraph/index.js +3 -3
- package/build/cjs/tracing/langgraph/index.js.map +1 -1
- package/build/cjs/tracing/langgraph/utils.js +2 -2
- package/build/cjs/tracing/langgraph/utils.js.map +1 -1
- package/build/cjs/tracing/openai/index.js +3 -3
- package/build/cjs/tracing/openai/index.js.map +1 -1
- package/build/cjs/tracing/openai/streaming.js +2 -2
- package/build/cjs/tracing/openai/streaming.js.map +1 -1
- package/build/cjs/tracing/sentrySpan.js +5 -0
- package/build/cjs/tracing/sentrySpan.js.map +1 -1
- package/build/cjs/tracing/spans/captureSpan.js +5 -9
- package/build/cjs/tracing/spans/captureSpan.js.map +1 -1
- package/build/cjs/tracing/spans/extractGenAiSpans.js +60 -0
- package/build/cjs/tracing/spans/extractGenAiSpans.js.map +1 -0
- package/build/cjs/tracing/spans/spanJsonToStreamedSpan.js +26 -0
- package/build/cjs/tracing/spans/spanJsonToStreamedSpan.js.map +1 -0
- package/build/cjs/tracing/vercel-ai/index.js +6 -1
- package/build/cjs/tracing/vercel-ai/index.js.map +1 -1
- package/build/cjs/trpc.js +3 -3
- package/build/cjs/trpc.js.map +1 -1
- package/build/cjs/utils/exports.js +7 -7
- package/build/cjs/utils/exports.js.map +1 -1
- package/build/cjs/utils/flushIfServerless.js +2 -2
- package/build/cjs/utils/flushIfServerless.js.map +1 -1
- package/build/cjs/utils/string.js +9 -2
- package/build/cjs/utils/string.js.map +1 -1
- package/build/cjs/utils/traceData.js +2 -2
- package/build/cjs/utils/traceData.js.map +1 -1
- package/build/cjs/utils/version.js +1 -1
- package/build/esm/browser.js +142 -0
- package/build/esm/browser.js.map +1 -0
- package/build/esm/client.js +9 -0
- package/build/esm/client.js.map +1 -1
- package/build/esm/index.js +17 -17
- package/build/esm/instrument/console.js +44 -5
- package/build/esm/instrument/console.js.map +1 -1
- package/build/esm/integrations/console.js +6 -2
- package/build/esm/integrations/console.js.map +1 -1
- package/build/esm/integrations/mcp-server/handlers.js +72 -1
- package/build/esm/integrations/mcp-server/handlers.js.map +1 -1
- package/build/esm/integrations/mcp-server/index.js +11 -2
- package/build/esm/integrations/mcp-server/index.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/esm/semanticAttributes.js +4 -4
- package/build/esm/semanticAttributes.js.map +1 -1
- package/build/esm/server.js +157 -0
- package/build/esm/server.js.map +1 -0
- package/build/esm/tracing/sentrySpan.js +5 -0
- package/build/esm/tracing/sentrySpan.js.map +1 -1
- package/build/esm/tracing/spans/captureSpan.js +5 -9
- package/build/esm/tracing/spans/captureSpan.js.map +1 -1
- package/build/esm/tracing/spans/extractGenAiSpans.js +58 -0
- package/build/esm/tracing/spans/extractGenAiSpans.js.map +1 -0
- package/build/esm/tracing/spans/spanJsonToStreamedSpan.js +24 -0
- package/build/esm/tracing/spans/spanJsonToStreamedSpan.js.map +1 -0
- package/build/esm/tracing/vercel-ai/index.js +6 -1
- package/build/esm/tracing/vercel-ai/index.js.map +1 -1
- package/build/esm/utils/exports.js +7 -7
- package/build/esm/utils/exports.js.map +1 -1
- package/build/esm/utils/string.js +9 -2
- package/build/esm/utils/string.js.map +1 -1
- package/build/esm/utils/version.js +1 -1
- package/build/types/browser-exports.d.ts +11 -0
- package/build/types/browser-exports.d.ts.map +1 -0
- package/build/types/browser.d.ts +3 -0
- package/build/types/browser.d.ts.map +1 -0
- package/build/types/build-time-plugins/buildTimeOptionsBase.d.ts +8 -0
- package/build/types/build-time-plugins/buildTimeOptionsBase.d.ts.map +1 -1
- package/build/types/carrier.d.ts +1 -1
- package/build/types/carrier.d.ts.map +1 -1
- package/build/types/client.d.ts.map +1 -1
- package/build/types/index.d.ts +3 -232
- package/build/types/index.d.ts.map +1 -1
- package/build/types/instrument/console.d.ts +7 -0
- package/build/types/instrument/console.d.ts.map +1 -1
- package/build/types/integrations/captureconsole.d.ts +1 -1
- package/build/types/integrations/captureconsole.d.ts.map +1 -1
- package/build/types/integrations/console.d.ts +5 -0
- package/build/types/integrations/console.d.ts.map +1 -1
- package/build/types/integrations/conversationId.d.ts +1 -1
- package/build/types/integrations/conversationId.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/eventFilters.d.ts +2 -2
- package/build/types/integrations/eventFilters.d.ts.map +1 -1
- package/build/types/integrations/extraerrordata.d.ts +1 -1
- package/build/types/integrations/extraerrordata.d.ts.map +1 -1
- package/build/types/integrations/functiontostring.d.ts +1 -1
- package/build/types/integrations/functiontostring.d.ts.map +1 -1
- package/build/types/integrations/linkederrors.d.ts +1 -1
- package/build/types/integrations/linkederrors.d.ts.map +1 -1
- package/build/types/integrations/mcp-server/handlers.d.ts +18 -0
- package/build/types/integrations/mcp-server/handlers.d.ts.map +1 -1
- package/build/types/integrations/mcp-server/index.d.ts +8 -1
- package/build/types/integrations/mcp-server/index.d.ts.map +1 -1
- package/build/types/integrations/requestdata.d.ts +1 -1
- package/build/types/integrations/requestdata.d.ts.map +1 -1
- package/build/types/integrations/spanStreaming.d.ts +1 -1
- package/build/types/integrations/spanStreaming.d.ts.map +1 -1
- package/build/types/integrations/supabase.d.ts +1 -1
- package/build/types/integrations/supabase.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/semanticAttributes.d.ts +4 -4
- package/build/types/semanticAttributes.d.ts.map +1 -1
- package/build/types/server-exports.d.ts +26 -0
- package/build/types/server-exports.d.ts.map +1 -0
- package/build/types/server.d.ts +10 -0
- package/build/types/server.d.ts.map +1 -0
- package/build/types/shared-exports.d.ts +215 -0
- package/build/types/shared-exports.d.ts.map +1 -0
- package/build/types/tracing/sentrySpan.d.ts.map +1 -1
- package/build/types/tracing/spans/captureSpan.d.ts.map +1 -1
- package/build/types/tracing/spans/extractGenAiSpans.d.ts +15 -0
- package/build/types/tracing/spans/extractGenAiSpans.d.ts.map +1 -0
- package/build/types/tracing/spans/spanJsonToStreamedSpan.d.ts +6 -0
- package/build/types/tracing/spans/spanJsonToStreamedSpan.d.ts.map +1 -0
- package/build/types/tracing/vercel-ai/index.d.ts.map +1 -1
- package/build/types/types-hoist/envelope.d.ts +1 -1
- package/build/types/types-hoist/envelope.d.ts.map +1 -1
- package/build/types/types-hoist/options.d.ts +8 -0
- package/build/types/types-hoist/options.d.ts.map +1 -1
- package/build/types/utils/string.d.ts +1 -1
- package/build/types/utils/string.d.ts.map +1 -1
- package/build/types-ts3.8/browser-exports.d.ts +11 -0
- package/build/types-ts3.8/browser.d.ts +3 -0
- package/build/types-ts3.8/build-time-plugins/buildTimeOptionsBase.d.ts +8 -0
- package/build/types-ts3.8/carrier.d.ts +1 -1
- package/build/types-ts3.8/index.d.ts +3 -234
- package/build/types-ts3.8/instrument/console.d.ts +7 -0
- package/build/types-ts3.8/integrations/captureconsole.d.ts +1 -1
- package/build/types-ts3.8/integrations/console.d.ts +5 -0
- package/build/types-ts3.8/integrations/conversationId.d.ts +1 -1
- package/build/types-ts3.8/integrations/dedupe.d.ts +1 -1
- package/build/types-ts3.8/integrations/eventFilters.d.ts +2 -2
- package/build/types-ts3.8/integrations/extraerrordata.d.ts +1 -1
- package/build/types-ts3.8/integrations/functiontostring.d.ts +1 -1
- package/build/types-ts3.8/integrations/linkederrors.d.ts +1 -1
- package/build/types-ts3.8/integrations/mcp-server/handlers.d.ts +18 -0
- package/build/types-ts3.8/integrations/mcp-server/index.d.ts +8 -1
- package/build/types-ts3.8/integrations/requestdata.d.ts +1 -1
- package/build/types-ts3.8/integrations/spanStreaming.d.ts +1 -1
- package/build/types-ts3.8/integrations/supabase.d.ts +1 -1
- 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/semanticAttributes.d.ts +4 -4
- package/build/types-ts3.8/server-exports.d.ts +21 -0
- package/build/types-ts3.8/server.d.ts +10 -0
- package/build/types-ts3.8/shared-exports.d.ts +214 -0
- package/build/types-ts3.8/tracing/spans/extractGenAiSpans.d.ts +15 -0
- package/build/types-ts3.8/tracing/spans/spanJsonToStreamedSpan.d.ts +6 -0
- package/build/types-ts3.8/types-hoist/envelope.d.ts +1 -1
- package/build/types-ts3.8/types-hoist/options.d.ts +8 -0
- package/build/types-ts3.8/utils/string.d.ts +1 -1
- package/package.json +32 -2
- package/server.d.ts +4 -0
- package/server.js +3 -0
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
export { registerSpanErrorInstrumentation } from './tracing/errors.js';
|
|
2
|
+
export { getCapturedScopesOnSpan, setCapturedScopesOnSpan } from './tracing/utils.js';
|
|
3
|
+
export { TRACING_DEFAULTS, startIdleSpan } from './tracing/idleSpan.js';
|
|
4
|
+
export { SentrySpan } from './tracing/sentrySpan.js';
|
|
5
|
+
export { SentryNonRecordingSpan } from './tracing/sentryNonRecordingSpan.js';
|
|
6
|
+
export { SPAN_STATUS_ERROR, SPAN_STATUS_OK, SPAN_STATUS_UNSET, getSpanStatusFromHttpCode, setHttpStatus } from './tracing/spanstatus.js';
|
|
7
|
+
export { SUPPRESS_TRACING_KEY, continueTrace, startInactiveSpan, startNewTrace, startSpan, startSpanManual, suppressTracing, withActiveSpan } from './tracing/trace.js';
|
|
8
|
+
export { getDynamicSamplingContextFromClient, getDynamicSamplingContextFromScope, getDynamicSamplingContextFromSpan, spanToBaggageHeader } from './tracing/dynamicSamplingContext.js';
|
|
9
|
+
export { setMeasurement, timedEventsToMeasurements } from './tracing/measurement.js';
|
|
10
|
+
export { sampleSpan } from './tracing/sampling.js';
|
|
11
|
+
export { logSpanEnd, logSpanStart } from './tracing/logSpans.js';
|
|
12
|
+
export { captureSpan, safeSetSpanJSONAttributes } from './tracing/spans/captureSpan.js';
|
|
13
|
+
export { GEN_AI_CONVERSATION_ID_ATTRIBUTE, SEMANTIC_ATTRIBUTE_CACHE_HIT, SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE, SEMANTIC_ATTRIBUTE_CACHE_KEY, SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME, SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD, SEMANTIC_ATTRIBUTE_PROFILE_ID, SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME, SEMANTIC_ATTRIBUTE_SENTRY_ENVIRONMENT, SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_PREVIOUS_TRACE_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_RELEASE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_SDK_NAME, SEMANTIC_ATTRIBUTE_SENTRY_SDK_VERSION, SEMANTIC_ATTRIBUTE_SENTRY_SEGMENT_ID, SEMANTIC_ATTRIBUTE_SENTRY_SEGMENT_NAME, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_URL_FULL, SEMANTIC_ATTRIBUTE_USER_EMAIL, SEMANTIC_ATTRIBUTE_USER_ID, SEMANTIC_ATTRIBUTE_USER_IP_ADDRESS, SEMANTIC_ATTRIBUTE_USER_USERNAME, SEMANTIC_LINK_ATTRIBUTE_LINK_TYPE } from './semanticAttributes.js';
|
|
14
|
+
export { createEventEnvelope, createSessionEnvelope, createSpanEnvelope } from './envelope.js';
|
|
15
|
+
export { addEventProcessor, captureCheckIn, captureEvent, captureException, captureMessage, captureSession, close, endSession, flush, isEnabled, isInitialized, lastEventId, setContext, setConversationId, setExtra, setExtras, setTag, setTags, setUser, startSession, withMonitor } from './exports.js';
|
|
16
|
+
export { getClient, getCurrentScope, getExternalPropagationContext, getGlobalScope, getIsolationScope, getTraceContextFromScope, hasExternalPropagationContext, registerExternalPropagationContext, withIsolationScope, withScope } from './currentScopes.js';
|
|
17
|
+
export { getDefaultCurrentScope, getDefaultIsolationScope } from './defaultScopes.js';
|
|
18
|
+
export { setAsyncContextStrategy } from './asyncContext/index.js';
|
|
19
|
+
export { getGlobalSingleton, getMainCarrier } from './carrier.js';
|
|
20
|
+
export { closeSession, makeSession, updateSession } from './session.js';
|
|
21
|
+
export { Scope } from './scope.js';
|
|
22
|
+
export { notifyEventProcessors } from './eventProcessors.js';
|
|
23
|
+
export { SENTRY_API_VERSION, getEnvelopeEndpointWithUrlEncodedAuth, getReportDialogEndpoint } from './api.js';
|
|
24
|
+
export { Client } from './client.js';
|
|
25
|
+
export { initAndBind, setCurrentClient } from './sdk.js';
|
|
26
|
+
export { createTransport } from './transports/base.js';
|
|
27
|
+
export { makeOfflineTransport } from './transports/offline.js';
|
|
28
|
+
export { MULTIPLEXED_TRANSPORT_EXTRA_KEY, makeMultiplexedTransport } from './transports/multiplexed.js';
|
|
29
|
+
export { addIntegration, defineIntegration, getIntegrationsToSetup, installedIntegrations } from './integration.js';
|
|
30
|
+
export { _INTERNAL_clearAiProviderSkips, _INTERNAL_shouldSkipAiProviderWrapping, _INTERNAL_skipAiProviderWrapping } from './utils/ai/providerSkip.js';
|
|
31
|
+
export { envToBool } from './utils/envToBool.js';
|
|
32
|
+
export { applyScopeDataToEvent, getCombinedScopeData, mergeScopeData } from './utils/scopeData.js';
|
|
33
|
+
export { prepareEvent } from './utils/prepareEvent.js';
|
|
34
|
+
export { createCheckInEnvelope } from './checkin.js';
|
|
35
|
+
export { hasSpansEnabled } from './utils/hasSpansEnabled.js';
|
|
36
|
+
export { isStreamedBeforeSendSpanCallback, withStreamedSpan } from './tracing/spans/beforeSendSpan.js';
|
|
37
|
+
export { isSentryRequestUrl } from './utils/isSentryRequestUrl.js';
|
|
38
|
+
export { handleCallbackErrors } from './utils/handleCallbackErrors.js';
|
|
39
|
+
export { fmt, parameterize } from './utils/parameterize.js';
|
|
40
|
+
export { handleTunnelRequest } from './utils/tunnel.js';
|
|
41
|
+
export { addAutoIpAddressToSession, addAutoIpAddressToUser } from './utils/ipAddress.js';
|
|
42
|
+
export { INTERNAL_getSegmentSpan, addChildSpanToSpan, convertSpanLinksForEnvelope, getActiveSpan, getRootSpan, getSpanDescendants, getStatusMessage, spanIsSampled, spanTimeInputToSeconds, spanToJSON, spanToStreamedSpanJSON, spanToTraceContext, spanToTraceHeader, updateSpanName } from './utils/spanUtils.js';
|
|
43
|
+
export { _setSpanForScope as _INTERNAL_setSpanForScope } from './utils/spanOnScope.js';
|
|
44
|
+
export { parseSampleRate } from './utils/parseSampleRate.js';
|
|
45
|
+
export { applySdkMetadata } from './utils/sdkMetadata.js';
|
|
46
|
+
export { getTraceData } from './utils/traceData.js';
|
|
47
|
+
export { shouldPropagateTraceForUrl } from './utils/tracePropagationTargets.js';
|
|
48
|
+
export { getTraceMetaTags } from './utils/meta.js';
|
|
49
|
+
export { debounce } from './utils/debounce.js';
|
|
50
|
+
export { derefWeakRef, makeWeakRef } from './utils/weakRef.js';
|
|
51
|
+
export { shouldIgnoreSpan } from './utils/should-ignore-span.js';
|
|
52
|
+
export { MAX_BODY_BYTE_LENGTH, captureBodyFromWinterCGRequest, extractQueryParamsFromUrl, getMaxBodyByteLength, headersToDict, httpHeadersToSpanAttributes, httpRequestToRequestData, winterCGHeadersToDict, winterCGRequestToRequestData } from './utils/request.js';
|
|
53
|
+
export { DEFAULT_ENVIRONMENT, DEV_ENVIRONMENT } from './constants.js';
|
|
54
|
+
export { addBreadcrumb } from './breadcrumbs.js';
|
|
55
|
+
export { functionToStringIntegration } from './integrations/functiontostring.js';
|
|
56
|
+
export { eventFiltersIntegration, inboundFiltersIntegration } from './integrations/eventFilters.js';
|
|
57
|
+
export { linkedErrorsIntegration } from './integrations/linkederrors.js';
|
|
58
|
+
export { moduleMetadataIntegration } from './integrations/moduleMetadata.js';
|
|
59
|
+
export { requestDataIntegration } from './integrations/requestdata.js';
|
|
60
|
+
export { captureConsoleIntegration } from './integrations/captureconsole.js';
|
|
61
|
+
export { dedupeIntegration } from './integrations/dedupe.js';
|
|
62
|
+
export { extraErrorDataIntegration } from './integrations/extraerrordata.js';
|
|
63
|
+
export { rewriteFramesIntegration } from './integrations/rewriteframes.js';
|
|
64
|
+
export { instrumentSupabaseClient, supabaseIntegration } from './integrations/supabase.js';
|
|
65
|
+
export { zodErrorsIntegration } from './integrations/zoderrors.js';
|
|
66
|
+
export { thirdPartyErrorFilterIntegration } from './integrations/third-party-errors-filter.js';
|
|
67
|
+
export { consoleIntegration } from './integrations/console.js';
|
|
68
|
+
export { featureFlagsIntegration } from './integrations/featureFlags/featureFlagsIntegration.js';
|
|
69
|
+
export { growthbookIntegration } from './integrations/featureFlags/growthbook.js';
|
|
70
|
+
export { conversationIdIntegration } from './integrations/conversationId.js';
|
|
71
|
+
export { profiler } from './profiling.js';
|
|
72
|
+
export { _INTERNAL_getTracingHeadersForFetchRequest, instrumentFetchRequest } from './fetch.js';
|
|
73
|
+
export { captureFeedback } from './feedback.js';
|
|
74
|
+
export { _INTERNAL_captureLog, _INTERNAL_captureSerializedLog, _INTERNAL_flushLogsBuffer } from './logs/internal.js';
|
|
75
|
+
import * as publicApi from './logs/public-api.js';
|
|
76
|
+
export { publicApi as logger };
|
|
77
|
+
export { consoleLoggingIntegration } from './logs/console-integration.js';
|
|
78
|
+
export { _INTERNAL_captureMetric, _INTERNAL_captureSerializedMetric, _INTERNAL_flushMetricsBuffer } from './metrics/internal.js';
|
|
79
|
+
import * as publicApi$1 from './metrics/public-api.js';
|
|
80
|
+
export { publicApi$1 as metrics };
|
|
81
|
+
export { createConsolaReporter } from './integrations/consola.js';
|
|
82
|
+
export { addVercelAiProcessors } from './tracing/vercel-ai/index.js';
|
|
83
|
+
export { _INTERNAL_cleanupToolCallSpanContext, _INTERNAL_getSpanContextForToolCallId } from './tracing/vercel-ai/utils.js';
|
|
84
|
+
export { toolCallSpanContextMap as _INTERNAL_toolCallSpanContextMap } from './tracing/vercel-ai/constants.js';
|
|
85
|
+
export { instrumentOpenAiClient } from './tracing/openai/index.js';
|
|
86
|
+
export { OPENAI_INTEGRATION_NAME } from './tracing/openai/constants.js';
|
|
87
|
+
export { instrumentAnthropicAiClient } from './tracing/anthropic-ai/index.js';
|
|
88
|
+
export { ANTHROPIC_AI_INTEGRATION_NAME } from './tracing/anthropic-ai/constants.js';
|
|
89
|
+
export { instrumentGoogleGenAIClient } from './tracing/google-genai/index.js';
|
|
90
|
+
export { GOOGLE_GENAI_INTEGRATION_NAME } from './tracing/google-genai/constants.js';
|
|
91
|
+
export { createLangChainCallbackHandler } from './tracing/langchain/index.js';
|
|
92
|
+
export { LANGCHAIN_INTEGRATION_NAME } from './tracing/langchain/constants.js';
|
|
93
|
+
export { instrumentCreateReactAgent, instrumentLangGraph, instrumentStateGraphCompile } from './tracing/langgraph/index.js';
|
|
94
|
+
export { LANGGRAPH_INTEGRATION_NAME } from './tracing/langgraph/constants.js';
|
|
95
|
+
export { SpanBuffer } from './tracing/spans/spanBuffer.js';
|
|
96
|
+
export { hasSpanStreamingEnabled } from './tracing/spans/hasSpanStreamingEnabled.js';
|
|
97
|
+
export { spanStreamingIntegration } from './integrations/spanStreaming.js';
|
|
98
|
+
export { _INTERNAL_FLAG_BUFFER_SIZE, _INTERNAL_MAX_FLAGS_PER_SPAN, _INTERNAL_addFeatureFlagToActiveSpan, _INTERNAL_copyFlagsFromScopeToEvent, _INTERNAL_insertFlagToScope } from './utils/featureFlags.js';
|
|
99
|
+
export { applyAggregateErrorsToEvent } from './utils/aggregate-errors.js';
|
|
100
|
+
export { getBreadcrumbLogLevelFromHttpStatusCode } from './utils/breadcrumb-log-level.js';
|
|
101
|
+
export { dsnFromString, dsnToString, makeDsn } from './utils/dsn.js';
|
|
102
|
+
export { SentryError } from './utils/error.js';
|
|
103
|
+
export { GLOBAL_OBJ } from './utils/worldwide.js';
|
|
104
|
+
export { addConsoleInstrumentationFilter, addConsoleInstrumentationHandler } from './instrument/console.js';
|
|
105
|
+
export { addFetchEndInstrumentationHandler, addFetchInstrumentationHandler } from './instrument/fetch.js';
|
|
106
|
+
export { addGlobalErrorInstrumentationHandler } from './instrument/globalError.js';
|
|
107
|
+
export { addGlobalUnhandledRejectionInstrumentationHandler } from './instrument/globalUnhandledRejection.js';
|
|
108
|
+
export { addHandler, maybeInstrument, resetInstrumentationHandlers, triggerHandlers } from './instrument/handlers.js';
|
|
109
|
+
export { isDOMError, isDOMException, isElement, isError, isErrorEvent, isEvent, isInstanceOf, isParameterizedString, isPlainObject, isPrimitive, isRegExp, isString, isSyntheticEvent, isThenable, isVueViewModel } from './utils/is.js';
|
|
110
|
+
export { isBrowser } from './utils/isBrowser.js';
|
|
111
|
+
export { CONSOLE_LEVELS, consoleSandbox, debug, originalConsoleMethods } from './utils/debug-logger.js';
|
|
112
|
+
export { addContextToFrame, addExceptionMechanism, addExceptionTypeValue, checkOrSetAlreadyCaught, getEventDescription, isAlreadyCaptured, parseSemver, uuid4 } from './utils/misc.js';
|
|
113
|
+
export { normalize, normalizeToSize, normalizeUrlToBase } from './utils/normalize.js';
|
|
114
|
+
export { setNormalizationDepthOverrideHint, setSkipNormalizationHint } from './utils/normalizationHints.js';
|
|
115
|
+
export { addNonEnumerableProperty, convertToPlainObject, dropUndefinedKeys, extractExceptionKeysForMessage, fill, getOriginalFunction, markFunctionWrapped, objectify } from './utils/object.js';
|
|
116
|
+
export { basename, dirname, isAbsolute, join, normalizePath, relative, resolve } from './utils/path.js';
|
|
117
|
+
export { SENTRY_BUFFER_FULL_ERROR, makePromiseBuffer } from './utils/promisebuffer.js';
|
|
118
|
+
export { severityLevelFromString } from './utils/severity.js';
|
|
119
|
+
export { replaceExports } from './utils/exports.js';
|
|
120
|
+
export { UNKNOWN_FUNCTION, createStackParser, getFramesFromEvent, getFunctionName, stackParserFromStackParserOptions, stripSentryFramesAndReverse } from './utils/stacktrace.js';
|
|
121
|
+
export { isMatchingPattern, safeJoin, snipLine, stringMatchesSomePattern, truncate } from './utils/string.js';
|
|
122
|
+
export { isNativeFunction, supportsDOMError, supportsDOMException, supportsErrorEvent, supportsFetch, supportsHistory, supportsNativeFetch, supportsReferrerPolicy, supportsReportingObserver } from './utils/supports.js';
|
|
123
|
+
export { SyncPromise, rejectedSyncPromise, resolvedSyncPromise } from './utils/syncpromise.js';
|
|
124
|
+
export { browserPerformanceTimeOrigin, dateTimestampInSeconds, timestampInSeconds } from './utils/time.js';
|
|
125
|
+
export { TRACEPARENT_REGEXP, extractTraceparentData, generateSentryTraceHeader, generateTraceparentHeader, propagationContextFromHeaders, shouldContinueTrace } from './utils/tracing.js';
|
|
126
|
+
export { getSDKSource, isBrowserBundle } from './utils/env.js';
|
|
127
|
+
export { addItemToEnvelope, createAttachmentEnvelopeItem, createEnvelope, createEventEnvelopeHeaders, createSpanEnvelopeItem, envelopeContainsItemType, envelopeItemTypeToDataCategory, forEachEnvelopeItem, getSdkMetadataForEnvelopeHeader, parseEnvelope, serializeEnvelope } from './utils/envelope.js';
|
|
128
|
+
export { createClientReportEnvelope } from './utils/clientreport.js';
|
|
129
|
+
export { DEFAULT_RETRY_AFTER, disabledUntil, isRateLimited, parseRetryAfterHeader, updateRateLimits } from './utils/ratelimit.js';
|
|
130
|
+
export { MAX_BAGGAGE_STRING_LENGTH, SENTRY_BAGGAGE_KEY_PREFIX, SENTRY_BAGGAGE_KEY_PREFIX_REGEX, baggageHeaderToDynamicSamplingContext, dynamicSamplingContextToSentryBaggageHeader, mergeBaggageHeaders, objectToBaggageHeader, parseBaggageHeader } from './utils/baggage.js';
|
|
131
|
+
export { getHttpSpanDetailsFromUrlObject, getSanitizedUrlString, getSanitizedUrlStringFromUrlObject, isURLObjectRelative, parseStringToURLObject, parseUrl, stripDataUrlContent, stripUrlQueryAndFragment } from './utils/url.js';
|
|
132
|
+
export { _enhanceErrorWithSentryInfo as _INTERNAL_enhanceErrorWithSentryInfo, eventFromMessage, eventFromUnknownInput, exceptionFromError, parseStackFrames } from './utils/eventbuilder.js';
|
|
133
|
+
export { LRUMap } from './utils/lru.js';
|
|
134
|
+
export { generateSpanId, generateTraceId } from './utils/propagationContext.js';
|
|
135
|
+
export { SDK_VERSION } from './utils/version.js';
|
|
136
|
+
export { getDebugImagesForResources, getFilenameToDebugIdMap } from './utils/debug-ids.js';
|
|
137
|
+
export { getFilenameToMetadataMap } from './metadata.js';
|
|
138
|
+
export { escapeStringForRegex } from './vendor/escapeStringForRegex.js';
|
|
139
|
+
export { safeDateNow as _INTERNAL_safeDateNow, safeMathRandom as _INTERNAL_safeMathRandom, withRandomSafeContext as _INTERNAL_withRandomSafeContext } from './utils/randomSafeContext.js';
|
|
140
|
+
export { getComponentName, getLocationHref, htmlTreeAsString } from './utils/browser.js';
|
|
141
|
+
export { instrumentLangChainEmbeddings } from './tracing/langchain/embeddings.js';
|
|
142
|
+
//# sourceMappingURL=browser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/build/esm/client.js
CHANGED
|
@@ -9,6 +9,7 @@ import { _INTERNAL_flushMetricsBuffer } from './metrics/internal.js';
|
|
|
9
9
|
import { updateSession } from './session.js';
|
|
10
10
|
import { getDynamicSamplingContextFromScope } from './tracing/dynamicSamplingContext.js';
|
|
11
11
|
import { isStreamedBeforeSendSpanCallback } from './tracing/spans/beforeSendSpan.js';
|
|
12
|
+
import { extractGenAiSpansFromEvent } from './tracing/spans/extractGenAiSpans.js';
|
|
12
13
|
import { DEFAULT_TRANSPORT_BUFFER_SIZE } from './transports/base.js';
|
|
13
14
|
import { createClientReportEnvelope } from './utils/clientreport.js';
|
|
14
15
|
import { debug } from './utils/debug-logger.js';
|
|
@@ -478,12 +479,20 @@ class Client {
|
|
|
478
479
|
sendEvent(event, hint = {}) {
|
|
479
480
|
this.emit('beforeSendEvent', event, hint);
|
|
480
481
|
|
|
482
|
+
// Extract gen_ai spans from transaction and convert to span v2 format.
|
|
483
|
+
// This mutates event.spans to remove the extracted spans.
|
|
484
|
+
const genAiSpanItem = extractGenAiSpansFromEvent(event, this);
|
|
485
|
+
|
|
481
486
|
let env = createEventEnvelope(event, this._dsn, this._options._metadata, this._options.tunnel);
|
|
482
487
|
|
|
483
488
|
for (const attachment of hint.attachments || []) {
|
|
484
489
|
env = addItemToEnvelope(env, createAttachmentEnvelopeItem(attachment));
|
|
485
490
|
}
|
|
486
491
|
|
|
492
|
+
if (genAiSpanItem) {
|
|
493
|
+
env = addItemToEnvelope(env, genAiSpanItem);
|
|
494
|
+
}
|
|
495
|
+
|
|
487
496
|
// sendEnvelope should not throw
|
|
488
497
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
489
498
|
this.sendEnvelope(env).then(sendResponse => this.emit('afterSendEvent', event, sendResponse));
|