@sentry/core 10.51.0 → 10.52.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/client.js +6 -2
- package/build/cjs/client.js.map +1 -1
- package/build/cjs/fetch.js +7 -4
- package/build/cjs/fetch.js.map +1 -1
- package/build/cjs/index.js +27 -8
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/integrations/express/index.js +2 -4
- package/build/cjs/integrations/express/index.js.map +1 -1
- package/build/cjs/integrations/express/utils.js +0 -7
- package/build/cjs/integrations/express/utils.js.map +1 -1
- package/build/cjs/integrations/http/add-outgoing-request-breadcrumb.js +43 -0
- package/build/cjs/integrations/http/add-outgoing-request-breadcrumb.js.map +1 -0
- package/build/cjs/integrations/http/client-patch.js +113 -0
- package/build/cjs/integrations/http/client-patch.js.map +1 -0
- package/build/cjs/integrations/http/client-subscriptions.js +166 -0
- package/build/cjs/integrations/http/client-subscriptions.js.map +1 -0
- package/build/cjs/integrations/http/constants.js +10 -0
- package/build/cjs/integrations/http/constants.js.map +1 -0
- package/build/cjs/integrations/http/double-wrap-warning.js +29 -0
- package/build/cjs/integrations/http/double-wrap-warning.js.map +1 -0
- package/build/cjs/integrations/http/get-outgoing-span-data.js +88 -0
- package/build/cjs/integrations/http/get-outgoing-span-data.js.map +1 -0
- package/build/cjs/integrations/http/get-request-url.js +54 -0
- package/build/cjs/integrations/http/get-request-url.js.map +1 -0
- package/build/cjs/integrations/http/inject-trace-propagation-headers.js +81 -0
- package/build/cjs/integrations/http/inject-trace-propagation-headers.js.map +1 -0
- package/build/cjs/integrations/requestdata.js +85 -3
- package/build/cjs/integrations/requestdata.js.map +1 -1
- package/build/cjs/logs/envelope.js +12 -2
- package/build/cjs/logs/envelope.js.map +1 -1
- package/build/cjs/logs/internal.js +7 -1
- package/build/cjs/logs/internal.js.map +1 -1
- package/build/cjs/metrics/envelope.js +15 -2
- package/build/cjs/metrics/envelope.js.map +1 -1
- package/build/cjs/metrics/internal.js +7 -1
- package/build/cjs/metrics/internal.js.map +1 -1
- package/build/cjs/tracing/spans/captureSpan.js +58 -23
- package/build/cjs/tracing/spans/captureSpan.js.map +1 -1
- package/build/cjs/tracing/trace.js +1 -0
- package/build/cjs/tracing/trace.js.map +1 -1
- package/build/cjs/tracing/vercel-ai/constants.js +8 -0
- package/build/cjs/tracing/vercel-ai/constants.js.map +1 -1
- package/build/cjs/tracing/vercel-ai/index.js +93 -14
- package/build/cjs/tracing/vercel-ai/index.js.map +1 -1
- package/build/cjs/utils/baggage.js +73 -0
- package/build/cjs/utils/baggage.js.map +1 -1
- package/build/cjs/utils/chain-and-copy-promiselike.js +1 -0
- package/build/cjs/utils/chain-and-copy-promiselike.js.map +1 -1
- package/build/cjs/utils/get-default-export.js +32 -0
- package/build/cjs/utils/get-default-export.js.map +1 -0
- package/build/cjs/utils/request.js +129 -0
- package/build/cjs/utils/request.js.map +1 -1
- package/build/cjs/utils/spanUtils.js +1 -1
- package/build/cjs/utils/spanUtils.js.map +1 -1
- package/build/cjs/utils/version.js +1 -1
- package/build/esm/client.js +6 -2
- package/build/esm/client.js.map +1 -1
- package/build/esm/fetch.js +7 -4
- package/build/esm/fetch.js.map +1 -1
- package/build/esm/index.js +8 -3
- package/build/esm/index.js.map +1 -1
- package/build/esm/integrations/express/index.js +3 -5
- package/build/esm/integrations/express/index.js.map +1 -1
- package/build/esm/integrations/express/utils.js +1 -7
- package/build/esm/integrations/express/utils.js.map +1 -1
- package/build/esm/integrations/http/add-outgoing-request-breadcrumb.js +41 -0
- package/build/esm/integrations/http/add-outgoing-request-breadcrumb.js.map +1 -0
- package/build/esm/integrations/http/client-patch.js +111 -0
- package/build/esm/integrations/http/client-patch.js.map +1 -0
- package/build/esm/integrations/http/client-subscriptions.js +164 -0
- package/build/esm/integrations/http/client-subscriptions.js.map +1 -0
- package/build/esm/integrations/http/constants.js +6 -0
- package/build/esm/integrations/http/constants.js.map +1 -0
- package/build/esm/integrations/http/double-wrap-warning.js +26 -0
- package/build/esm/integrations/http/double-wrap-warning.js.map +1 -0
- package/build/esm/integrations/http/get-outgoing-span-data.js +85 -0
- package/build/esm/integrations/http/get-outgoing-span-data.js.map +1 -0
- package/build/esm/integrations/http/get-request-url.js +49 -0
- package/build/esm/integrations/http/get-request-url.js.map +1 -0
- package/build/esm/integrations/http/inject-trace-propagation-headers.js +79 -0
- package/build/esm/integrations/http/inject-trace-propagation-headers.js.map +1 -0
- package/build/esm/integrations/requestdata.js +85 -3
- package/build/esm/integrations/requestdata.js.map +1 -1
- package/build/esm/logs/envelope.js +12 -2
- package/build/esm/logs/envelope.js.map +1 -1
- package/build/esm/logs/internal.js +7 -1
- package/build/esm/logs/internal.js.map +1 -1
- package/build/esm/metrics/envelope.js +15 -2
- package/build/esm/metrics/envelope.js.map +1 -1
- package/build/esm/metrics/internal.js +7 -1
- package/build/esm/metrics/internal.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/esm/tracing/spans/captureSpan.js +58 -23
- package/build/esm/tracing/spans/captureSpan.js.map +1 -1
- package/build/esm/tracing/trace.js +1 -1
- package/build/esm/tracing/trace.js.map +1 -1
- package/build/esm/tracing/vercel-ai/constants.js +8 -1
- package/build/esm/tracing/vercel-ai/constants.js.map +1 -1
- package/build/esm/tracing/vercel-ai/index.js +95 -17
- package/build/esm/tracing/vercel-ai/index.js.map +1 -1
- package/build/esm/utils/baggage.js +73 -1
- package/build/esm/utils/baggage.js.map +1 -1
- package/build/esm/utils/chain-and-copy-promiselike.js +1 -0
- package/build/esm/utils/chain-and-copy-promiselike.js.map +1 -1
- package/build/esm/utils/get-default-export.js +30 -0
- package/build/esm/utils/get-default-export.js.map +1 -0
- package/build/esm/utils/request.js +127 -1
- package/build/esm/utils/request.js.map +1 -1
- package/build/esm/utils/spanUtils.js +1 -1
- package/build/esm/utils/spanUtils.js.map +1 -1
- package/build/esm/utils/version.js +1 -1
- package/build/types/client.d.ts.map +1 -1
- package/build/types/fetch.d.ts.map +1 -1
- package/build/types/index.d.ts +13 -4
- package/build/types/index.d.ts.map +1 -1
- package/build/types/integrations/express/index.d.ts.map +1 -1
- package/build/types/integrations/express/utils.d.ts +1 -5
- package/build/types/integrations/express/utils.d.ts.map +1 -1
- package/build/types/integrations/http/add-outgoing-request-breadcrumb.d.ts +6 -0
- package/build/types/integrations/http/add-outgoing-request-breadcrumb.d.ts.map +1 -0
- package/build/types/integrations/http/client-patch.d.ts +46 -0
- package/build/types/integrations/http/client-patch.d.ts.map +1 -0
- package/build/types/integrations/http/client-subscriptions.d.ts +21 -0
- package/build/types/integrations/http/client-subscriptions.d.ts.map +1 -0
- package/build/types/integrations/http/constants.d.ts +6 -0
- package/build/types/integrations/http/constants.d.ts.map +1 -0
- package/build/types/integrations/http/double-wrap-warning.d.ts +4 -0
- package/build/types/integrations/http/double-wrap-warning.d.ts.map +1 -0
- package/build/types/integrations/http/get-outgoing-span-data.d.ts +13 -0
- package/build/types/integrations/http/get-outgoing-span-data.d.ts.map +1 -0
- package/build/types/integrations/http/get-request-url.d.ts +10 -0
- package/build/types/integrations/http/get-request-url.d.ts.map +1 -0
- package/build/types/integrations/http/index.d.ts +4 -0
- package/build/types/integrations/http/index.d.ts.map +1 -0
- package/build/types/integrations/http/inject-trace-propagation-headers.d.ts +12 -0
- package/build/types/integrations/http/inject-trace-propagation-headers.d.ts.map +1 -0
- package/build/types/integrations/http/types.d.ts +249 -0
- package/build/types/integrations/http/types.d.ts.map +1 -0
- package/build/types/integrations/requestdata.d.ts.map +1 -1
- package/build/types/logs/envelope.d.ts +5 -2
- package/build/types/logs/envelope.d.ts.map +1 -1
- package/build/types/logs/internal.d.ts.map +1 -1
- package/build/types/metrics/envelope.d.ts +5 -2
- package/build/types/metrics/envelope.d.ts.map +1 -1
- package/build/types/metrics/internal.d.ts.map +1 -1
- package/build/types/tracing/index.d.ts +1 -1
- package/build/types/tracing/index.d.ts.map +1 -1
- package/build/types/tracing/spans/captureSpan.d.ts +4 -4
- package/build/types/tracing/spans/captureSpan.d.ts.map +1 -1
- package/build/types/tracing/trace.d.ts +1 -0
- package/build/types/tracing/trace.d.ts.map +1 -1
- package/build/types/tracing/vercel-ai/constants.d.ts +1 -0
- package/build/types/tracing/vercel-ai/constants.d.ts.map +1 -1
- package/build/types/tracing/vercel-ai/index.d.ts +9 -0
- package/build/types/tracing/vercel-ai/index.d.ts.map +1 -1
- package/build/types/types-hoist/log.d.ts +5 -0
- package/build/types/types-hoist/log.d.ts.map +1 -1
- package/build/types/types-hoist/metric.d.ts +5 -0
- package/build/types/types-hoist/metric.d.ts.map +1 -1
- package/build/types/types-hoist/webfetchapi.d.ts +2 -0
- package/build/types/types-hoist/webfetchapi.d.ts.map +1 -1
- package/build/types/utils/baggage.d.ts +13 -0
- package/build/types/utils/baggage.d.ts.map +1 -1
- package/build/types/utils/get-default-export.d.ts +22 -0
- package/build/types/utils/get-default-export.d.ts.map +1 -0
- package/build/types/utils/request.d.ts +30 -0
- package/build/types/utils/request.d.ts.map +1 -1
- package/build/types/utils/spanUtils.d.ts +1 -1
- package/build/types-ts3.8/index.d.ts +13 -4
- package/build/types-ts3.8/integrations/express/utils.d.ts +1 -5
- package/build/types-ts3.8/integrations/http/add-outgoing-request-breadcrumb.d.ts +6 -0
- package/build/types-ts3.8/integrations/http/client-patch.d.ts +46 -0
- package/build/types-ts3.8/integrations/http/client-subscriptions.d.ts +21 -0
- package/build/types-ts3.8/integrations/http/constants.d.ts +6 -0
- package/build/types-ts3.8/integrations/http/double-wrap-warning.d.ts +4 -0
- package/build/types-ts3.8/integrations/http/get-outgoing-span-data.d.ts +13 -0
- package/build/types-ts3.8/integrations/http/get-request-url.d.ts +10 -0
- package/build/types-ts3.8/integrations/http/index.d.ts +4 -0
- package/build/types-ts3.8/integrations/http/inject-trace-propagation-headers.d.ts +12 -0
- package/build/types-ts3.8/integrations/http/types.d.ts +252 -0
- package/build/types-ts3.8/logs/envelope.d.ts +5 -2
- package/build/types-ts3.8/metrics/envelope.d.ts +5 -2
- package/build/types-ts3.8/tracing/index.d.ts +1 -1
- package/build/types-ts3.8/tracing/spans/captureSpan.d.ts +4 -4
- package/build/types-ts3.8/tracing/trace.d.ts +1 -0
- package/build/types-ts3.8/tracing/vercel-ai/constants.d.ts +1 -0
- package/build/types-ts3.8/tracing/vercel-ai/index.d.ts +9 -0
- package/build/types-ts3.8/types-hoist/log.d.ts +5 -0
- package/build/types-ts3.8/types-hoist/metric.d.ts +5 -0
- package/build/types-ts3.8/types-hoist/webfetchapi.d.ts +2 -0
- package/build/types-ts3.8/utils/baggage.d.ts +13 -0
- package/build/types-ts3.8/utils/get-default-export.d.ts +22 -0
- package/build/types-ts3.8/utils/request.d.ts +30 -0
- package/build/types-ts3.8/utils/spanUtils.d.ts +1 -1
- package/package.json +1 -1
|
@@ -6,9 +6,11 @@ import { SdkMetadata } from '../types-hoist/sdkmetadata';
|
|
|
6
6
|
* Creates a log container envelope item for a list of logs.
|
|
7
7
|
*
|
|
8
8
|
* @param items - The logs to include in the envelope.
|
|
9
|
+
* @param inferUserData - If true, tells Relay to infer the end-user IP and User-Agent from the incoming request.
|
|
10
|
+
* Only emitted as `ingest_settings` in browser environments.
|
|
9
11
|
* @returns The created log container envelope item.
|
|
10
12
|
*/
|
|
11
|
-
export declare function createLogContainerEnvelopeItem(items: Array<SerializedLog
|
|
13
|
+
export declare function createLogContainerEnvelopeItem(items: Array<SerializedLog>, inferUserData?: boolean): LogContainerItem;
|
|
12
14
|
/**
|
|
13
15
|
* Creates an envelope for a list of logs.
|
|
14
16
|
*
|
|
@@ -18,7 +20,8 @@ export declare function createLogContainerEnvelopeItem(items: Array<SerializedLo
|
|
|
18
20
|
* @param metadata - The metadata to include in the envelope.
|
|
19
21
|
* @param tunnel - The tunnel to include in the envelope.
|
|
20
22
|
* @param dsn - The DSN to include in the envelope.
|
|
23
|
+
* @param inferUserData - If true, tells Relay to infer the end-user IP and User-Agent from the incoming request.
|
|
21
24
|
* @returns The created envelope.
|
|
22
25
|
*/
|
|
23
|
-
export declare function createLogEnvelope(logs: Array<SerializedLog>, metadata?: SdkMetadata, tunnel?: string, dsn?: DsnComponents): LogEnvelope;
|
|
26
|
+
export declare function createLogEnvelope(logs: Array<SerializedLog>, metadata?: SdkMetadata, tunnel?: string, dsn?: DsnComponents, inferUserData?: boolean): LogEnvelope;
|
|
24
27
|
//# sourceMappingURL=envelope.d.ts.map
|
|
@@ -6,9 +6,11 @@ import { SdkMetadata } from '../types-hoist/sdkmetadata';
|
|
|
6
6
|
* Creates a metric container envelope item for a list of metrics.
|
|
7
7
|
*
|
|
8
8
|
* @param items - The metrics to include in the envelope.
|
|
9
|
+
* @param inferUserData - If true, tells Relay to infer the end-user IP and User-Agent from the incoming request.
|
|
10
|
+
* Only emitted as `ingest_settings` in browser environments.
|
|
9
11
|
* @returns The created metric container envelope item.
|
|
10
12
|
*/
|
|
11
|
-
export declare function createMetricContainerEnvelopeItem(items: Array<SerializedMetric
|
|
13
|
+
export declare function createMetricContainerEnvelopeItem(items: Array<SerializedMetric>, inferUserData?: boolean): MetricContainerItem;
|
|
12
14
|
/**
|
|
13
15
|
* Creates an envelope for a list of metrics.
|
|
14
16
|
*
|
|
@@ -18,7 +20,8 @@ export declare function createMetricContainerEnvelopeItem(items: Array<Serialize
|
|
|
18
20
|
* @param metadata - The metadata to include in the envelope.
|
|
19
21
|
* @param tunnel - The tunnel to include in the envelope.
|
|
20
22
|
* @param dsn - The DSN to include in the envelope.
|
|
23
|
+
* @param inferUserData - If true, tells Relay to infer the end-user IP and User-Agent from the incoming request.
|
|
21
24
|
* @returns The created envelope.
|
|
22
25
|
*/
|
|
23
|
-
export declare function createMetricEnvelope(metrics: Array<SerializedMetric>, metadata?: SdkMetadata, tunnel?: string, dsn?: DsnComponents): MetricEnvelope;
|
|
26
|
+
export declare function createMetricEnvelope(metrics: Array<SerializedMetric>, metadata?: SdkMetadata, tunnel?: string, dsn?: DsnComponents, inferUserData?: boolean): MetricEnvelope;
|
|
24
27
|
//# sourceMappingURL=envelope.d.ts.map
|
|
@@ -5,7 +5,7 @@ export { SentrySpan } from './sentrySpan';
|
|
|
5
5
|
export { SentryNonRecordingSpan } from './sentryNonRecordingSpan';
|
|
6
6
|
export { setHttpStatus, getSpanStatusFromHttpCode } from './spanstatus';
|
|
7
7
|
export { SPAN_STATUS_ERROR, SPAN_STATUS_OK, SPAN_STATUS_UNSET } from './spanstatus';
|
|
8
|
-
export { startSpan, startInactiveSpan, startSpanManual, continueTrace, withActiveSpan, suppressTracing, startNewTrace, } from './trace';
|
|
8
|
+
export { startSpan, startInactiveSpan, startSpanManual, continueTrace, withActiveSpan, suppressTracing, startNewTrace, SUPPRESS_TRACING_KEY, } from './trace';
|
|
9
9
|
export { getDynamicSamplingContextFromClient, getDynamicSamplingContextFromSpan, getDynamicSamplingContextFromScope, spanToBaggageHeader, } from './dynamicSamplingContext';
|
|
10
10
|
export { setMeasurement, timedEventsToMeasurements } from './measurement';
|
|
11
11
|
export { sampleSpan } from './sampling';
|
|
@@ -14,15 +14,15 @@ export type SerializedStreamedSpanWithSegmentSpan = SerializedStreamedSpan & {
|
|
|
14
14
|
* is needed later on to compute the DSC for the span envelope.
|
|
15
15
|
*/
|
|
16
16
|
export declare function captureSpan(span: Span, client: Client): SerializedStreamedSpanWithSegmentSpan;
|
|
17
|
-
/**
|
|
18
|
-
* Apply a user-provided beforeSendSpan callback to a span JSON.
|
|
19
|
-
*/
|
|
20
|
-
export declare function applyBeforeSendSpanCallback(span: StreamedSpanJSON, beforeSendSpan: (span: StreamedSpanJSON) => StreamedSpanJSON): StreamedSpanJSON;
|
|
21
17
|
/**
|
|
22
18
|
* Safely set attributes on a span JSON.
|
|
23
19
|
* If an attribute already exists, it will not be overwritten.
|
|
24
20
|
*/
|
|
25
21
|
export declare function safeSetSpanJSONAttributes(spanJSON: StreamedSpanJSON, newAttributes: RawAttributes<Record<string, unknown>>): void;
|
|
22
|
+
/**
|
|
23
|
+
* Apply a user-provided beforeSendSpan callback to a span JSON.
|
|
24
|
+
*/
|
|
25
|
+
export declare function applyBeforeSendSpanCallback(span: StreamedSpanJSON, beforeSendSpan: (span: StreamedSpanJSON) => StreamedSpanJSON): StreamedSpanJSON;
|
|
26
26
|
/**
|
|
27
27
|
* Infer and backfill span data from OTel semantic conventions.
|
|
28
28
|
* This mirrors what the `SentrySpanExporter` does for non-streamed spans via `getSpanData`/`inferSpanData`.
|
|
@@ -2,6 +2,7 @@ import { Scope } from '../scope';
|
|
|
2
2
|
import { Span } from '../types-hoist/span';
|
|
3
3
|
import { StartSpanOptions } from '../types-hoist/startSpanOptions';
|
|
4
4
|
import { propagationContextFromHeaders } from '../utils/tracing';
|
|
5
|
+
export declare const SUPPRESS_TRACING_KEY = "__SENTRY_SUPPRESS_TRACING__";
|
|
5
6
|
/**
|
|
6
7
|
* Wraps a function with a transaction/span and finishes the span after the function is done.
|
|
7
8
|
* The created span is the active span and will be used as parent by other spans created inside the function
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ToolCallSpanContext } from './types';
|
|
2
2
|
export declare const toolCallSpanContextMap: Map<string, ToolCallSpanContext>;
|
|
3
|
+
export declare const toolDescriptionMap: Map<string, Map<string, string>>;
|
|
3
4
|
/** Maps Vercel AI span names to standardized OpenTelemetry operation names. */
|
|
4
5
|
export declare const SPAN_TO_OPERATION_NAME: Map<string, string>;
|
|
5
6
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import { Client } from '../../client';
|
|
2
|
+
/**
|
|
3
|
+
* Post-process spans emitted by the Vercel AI SDK.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Rename and normalize Vercel AI SDK attributes to OpenTelemetry semantic conventions.
|
|
7
|
+
* This is the shared attribute processing logic used by both the legacy event processor
|
|
8
|
+
* path (SpanJSON) and the streamed span path (StreamedSpanJSON).
|
|
9
|
+
*/
|
|
10
|
+
export declare function processVercelAiSpanAttributes(attributes: Record<string, unknown>): void;
|
|
2
11
|
/**
|
|
3
12
|
* Add event processors to the given client to process Vercel AI spans.
|
|
4
13
|
*/
|
|
@@ -52,6 +52,11 @@ export interface SerializedLog {
|
|
|
52
52
|
severity_number?: Log['severityNumber'];
|
|
53
53
|
}
|
|
54
54
|
export type SerializedLogContainer = {
|
|
55
|
+
version?: number;
|
|
56
|
+
ingest_settings?: {
|
|
57
|
+
infer_ip?: 'auto' | 'never';
|
|
58
|
+
infer_user_agent?: 'auto' | 'never';
|
|
59
|
+
};
|
|
55
60
|
items: Array<SerializedLog>;
|
|
56
61
|
};
|
|
57
62
|
//# sourceMappingURL=log.d.ts.map
|
|
@@ -61,6 +61,11 @@ export interface SerializedMetric {
|
|
|
61
61
|
attributes?: Attributes;
|
|
62
62
|
}
|
|
63
63
|
export type SerializedMetricContainer = {
|
|
64
|
+
version?: number;
|
|
65
|
+
ingest_settings?: {
|
|
66
|
+
infer_ip?: 'auto' | 'never';
|
|
67
|
+
infer_user_agent?: 'auto' | 'never';
|
|
68
|
+
};
|
|
64
69
|
items: Array<SerializedMetric>;
|
|
65
70
|
};
|
|
66
71
|
//# sourceMappingURL=metric.d.ts.map
|
|
@@ -10,6 +10,8 @@ export interface WebFetchRequest {
|
|
|
10
10
|
readonly headers: WebFetchHeaders;
|
|
11
11
|
readonly method: string;
|
|
12
12
|
readonly url: string;
|
|
13
|
+
readonly body?: unknown;
|
|
13
14
|
clone(): WebFetchRequest;
|
|
15
|
+
text(): Promise<string>;
|
|
14
16
|
}
|
|
15
17
|
//# sourceMappingURL=webfetchapi.d.ts.map
|
|
@@ -37,4 +37,17 @@ export declare function parseBaggageHeader(baggageHeader: string | string[] | nu
|
|
|
37
37
|
* is not spec compliant.
|
|
38
38
|
*/
|
|
39
39
|
export declare function objectToBaggageHeader(object: Record<string, string>): string | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Merge two baggage headers into one.
|
|
42
|
+
* - Sentry-specific entries (keys starting with "sentry-") from the new
|
|
43
|
+
* baggage take precedence
|
|
44
|
+
* - Non-Sentry entries from existing baggage take precedence
|
|
45
|
+
*
|
|
46
|
+
* The order of the existing baggage will be preserved, and new entries will
|
|
47
|
+
* be added to the end.
|
|
48
|
+
*
|
|
49
|
+
* This matches the behavior of OTEL's propagation.inject() which uses
|
|
50
|
+
* `baggage.setEntry()` to overwrite existing entries with the same key.
|
|
51
|
+
*/
|
|
52
|
+
export declare function mergeBaggageHeaders<Existing extends string | string[] | number | undefined>(existing: Existing, incoming: string): string | undefined | Existing;
|
|
40
53
|
//# sourceMappingURL=baggage.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Often we patch a module's default export, but we want to be able to do
|
|
3
|
+
* something like this:
|
|
4
|
+
*
|
|
5
|
+
* ```ts
|
|
6
|
+
* patchTheThing(await import('the-thing'));
|
|
7
|
+
* ```
|
|
8
|
+
*
|
|
9
|
+
* Or like this:
|
|
10
|
+
*
|
|
11
|
+
* ```ts
|
|
12
|
+
* import theThing from 'the-thing';
|
|
13
|
+
* patchTheThing(theThing);
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* Note: this does not support modules with a falsey default export. However,
|
|
17
|
+
* presumably in those cases, there's no default export to patch anyway.
|
|
18
|
+
*/
|
|
19
|
+
export declare function getDefaultExport<T>(moduleExport: T | {
|
|
20
|
+
default: T;
|
|
21
|
+
}): T;
|
|
22
|
+
//# sourceMappingURL=get-default-export.d.ts.map
|
|
@@ -1,5 +1,21 @@
|
|
|
1
|
+
import { Scope } from '../scope';
|
|
1
2
|
import { RequestEventData } from '../types-hoist/request';
|
|
2
3
|
import { WebFetchHeaders, WebFetchRequest } from '../types-hoist/webfetchapi';
|
|
4
|
+
/**
|
|
5
|
+
* Maximum size of incoming HTTP request bodies attached to events.
|
|
6
|
+
*
|
|
7
|
+
* - `'none'`: No request bodies will be attached
|
|
8
|
+
* - `'small'`: Request bodies up to 1,000 bytes will be attached
|
|
9
|
+
* - `'medium'`: Request bodies up to 10,000 bytes will be attached
|
|
10
|
+
* - `'always'`: Request bodies will always be attached (up to 1MB hard cap)
|
|
11
|
+
*/
|
|
12
|
+
export type MaxRequestBodySize = 'none' | 'small' | 'medium' | 'always';
|
|
13
|
+
/** Hard cap on captured body size, even when `maxRequestBodySize` is `'always'`. */
|
|
14
|
+
export declare const MAX_BODY_BYTE_LENGTH: number;
|
|
15
|
+
/**
|
|
16
|
+
* Convert a `maxRequestBodySize` setting to a maximum byte length.
|
|
17
|
+
*/
|
|
18
|
+
export declare function getMaxBodyByteLength(maxRequestBodySize: Exclude<MaxRequestBodySize, 'none'>): number;
|
|
3
19
|
/**
|
|
4
20
|
* Transforms a `Headers` object that implements the `Web Fetch API` (https://developer.mozilla.org/en-US/docs/Web/API/Headers) into a simple key-value dict.
|
|
5
21
|
* The header keys will be lower case: e.g. A "Content-Type" header will be stored as "content-type".
|
|
@@ -13,6 +29,20 @@ export declare function headersToDict(reqHeaders: Record<string, string | string
|
|
|
13
29
|
* Converts a `Request` object that implements the `Web Fetch API` (https://developer.mozilla.org/en-US/docs/Web/API/Headers) into the format that the `RequestData` integration understands.
|
|
14
30
|
*/
|
|
15
31
|
export declare function winterCGRequestToRequestData(req: WebFetchRequest): RequestEventData;
|
|
32
|
+
/**
|
|
33
|
+
* Captures the body from a Web Fetch API Request and adds it to the isolation scope.
|
|
34
|
+
*
|
|
35
|
+
* This function clones the request to read the body without affecting the original.
|
|
36
|
+
* Only textual content types are captured - binary data is skipped.
|
|
37
|
+
*
|
|
38
|
+
* This is used by WinterCG-compatible runtimes (Cloudflare Workers, Deno, Bun, Vercel Edge, etc.)
|
|
39
|
+
* that use the Web Fetch API Request object.
|
|
40
|
+
*
|
|
41
|
+
* @param request - The incoming Web Fetch API Request
|
|
42
|
+
* @param isolationScope - The isolation scope to add the body to
|
|
43
|
+
* @param maxRequestBodySize - The maximum size of the request body to capture ('small' = 1KB, 'medium' = 10KB, 'always' = 1MB)
|
|
44
|
+
*/
|
|
45
|
+
export declare function captureBodyFromWinterCGRequest(request: WebFetchRequest, isolationScope: Scope, maxRequestBodySize: Exclude<MaxRequestBodySize, 'none'>): Promise<void>;
|
|
16
46
|
/**
|
|
17
47
|
* Convert a HTTP request object to RequestEventData to be passed as normalizedRequest.
|
|
18
48
|
* Instead of allowing `PolymorphicRequest` to be passed,
|
|
@@ -73,7 +73,7 @@ export declare function spanIsSampled(span: Span): boolean;
|
|
|
73
73
|
/** Get the status message to use for a JSON representation of a span. */
|
|
74
74
|
export declare function getStatusMessage(status: SpanStatus | undefined): string | undefined;
|
|
75
75
|
/**
|
|
76
|
-
* Convert the various statuses to the simple
|
|
76
|
+
* Convert the various statuses to the simple ones expected by Sentry for streamed spans ('ok' is default).
|
|
77
77
|
*/
|
|
78
78
|
export declare function getSimpleStatusMessage(status: SpanStatus | undefined): 'ok' | 'error';
|
|
79
79
|
declare const CHILD_SPANS_FIELD = "_sentryChildSpans";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/core",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.52.0",
|
|
4
4
|
"description": "Base implementation for all Sentry JavaScript SDKs",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/core",
|