Socket
Socket
Sign inDemoInstall

@sentry/types

Package Overview
Dependencies
0
Maintainers
11
Versions
445
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.105.0 to 8.0.0-alpha.1

4

package.json
{
"name": "@sentry/types",
"version": "7.105.0",
"version": "8.0.0-alpha.1",
"description": "Types for all Sentry JavaScript SDKs",

@@ -10,3 +10,3 @@ "repository": "git://github.com/getsentry/sentry-javascript.git",

"engines": {
"node": ">=8"
"node": ">=14.8"
},

@@ -13,0 +13,0 @@ "files": [

@@ -0,7 +1,28 @@

/**
* An attachment to an event. This is used to upload arbitrary data to Sentry.
*
* Please take care to not add sensitive information in attachments.
*
* https://develop.sentry.dev/sdk/envelopes/#attachment
*/
export interface Attachment {
/**
* The attachment data. Can be a string or a binary data (byte array)
*/
data: string | Uint8Array;
/**
* The name of the uploaded file without a path component
*/
filename: string;
/**
* The content type of the attachment payload. Defaults to `application/octet-stream` if not specified.
*
* Any valid [media type](https://www.iana.org/assignments/media-types/media-types.xhtml) is allowed.
*/
contentType?: string;
attachmentType?: string;
/**
* The type of the attachment. Defaults to `event.attachment` if not specified.
*/
attachmentType?: 'event.attachment' | 'event.minidump' | 'event.applecrashreport' | 'unreal.context' | 'unreal.logs';
}
//# sourceMappingURL=attachment.d.ts.map

@@ -1,6 +0,6 @@

import { Severity, SeverityLevel } from './severity';
import { SeverityLevel } from './severity';
/** JSDoc */
export interface Breadcrumb {
type?: string;
level?: Severity | SeverityLevel;
level?: SeverityLevel;
event_id?: string;

@@ -7,0 +7,0 @@ category?: string;

@@ -11,3 +11,2 @@ import { Breadcrumb, BreadcrumbHint } from './breadcrumb';

import { Integration, IntegrationClass } from './integration';
import { MetricBucketItem } from './metrics';
import { ClientOptions } from './options';

@@ -18,3 +17,3 @@ import { ParameterizedString } from './parameterize';

import { Session, SessionAggregates } from './session';
import { Severity, SeverityLevel } from './severity';
import { SeverityLevel } from './severity';
import { StartSpanOptions } from './startSpanOptions';

@@ -51,3 +50,3 @@ import { Transaction } from './transaction';

*/
captureMessage(message: string, level?: Severity | SeverityLevel, hint?: EventHint, scope?: Scope): string | undefined;
captureMessage(message: string, level?: SeverityLevel, hint?: EventHint, scope?: Scope): string | undefined;
/**

@@ -67,3 +66,3 @@ * Captures a manually created event and sends it to Sentry.

*/
captureSession?(session: Session): void;
captureSession(session: Session): void;
/**

@@ -86,5 +85,4 @@ * Create a cron monitor check in and send it to Sentry. This method is not available on all clients.

*
* TODO (v8): Make this a required method.
*/
getSdkMetadata?(): SdkMetadata | undefined;
getSdkMetadata(): SdkMetadata | undefined;
/**

@@ -117,12 +115,8 @@ * Returns the transport that is used by the client.

* Adds an event processor that applies to any event processed by this client.
*
* TODO (v8): Make this a required method.
*/
addEventProcessor?(eventProcessor: EventProcessor): void;
addEventProcessor(eventProcessor: EventProcessor): void;
/**
* Get all added event processors for this client.
*
* TODO (v8): Make this a required method.
*/
getEventProcessors?(): EventProcessor[];
getEventProcessors(): EventProcessor[];
/**

@@ -134,3 +128,3 @@ * Returns the client's instance of the given integration class, it any.

/** Get the instance of the integration with the given name on the client, if it was added. */
getIntegrationByName?<T extends Integration = Integration>(name: string): T | undefined;
getIntegrationByName<T extends Integration = Integration>(name: string): T | undefined;
/**

@@ -142,5 +136,4 @@ * Add an integration to the client.

*
* TODO (v8): Make this a required method.
* */
addIntegration?(integration: Integration): void;
addIntegration(integration: Integration): void;
/**

@@ -155,7 +148,7 @@ * This is an internal function to setup all integrations that should run on the client.

*/
init?(): void;
init(): void;
/** Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`. */
eventFromException(exception: any, hint?: EventHint): PromiseLike<Event>;
/** Creates an {@link Event} from primitive inputs to `captureMessage`. */
eventFromMessage(message: ParameterizedString, level?: Severity | SeverityLevel, hint?: EventHint): PromiseLike<Event>;
eventFromMessage(message: ParameterizedString, level?: SeverityLevel, hint?: EventHint): PromiseLike<Event>;
/** Submits the event to Sentry */

@@ -174,12 +167,6 @@ sendEvent(event: Event, hint?: EventHint): void;

/**
* Captures serialized metrics and sends them to Sentry.
*
* @experimental This API is experimental and might experience breaking changes
*/
captureAggregateMetrics?(metricBucketItems: Array<MetricBucketItem>): void;
/**
* Register a callback for transaction start.
* Receives the transaction as argument.
*/
on?(hook: 'startTransaction', callback: (transaction: Transaction) => void): void;
on(hook: 'startTransaction', callback: (transaction: Transaction) => void): void;
/**

@@ -189,7 +176,7 @@ * Register a callback for transaction finish.

*/
on?(hook: 'finishTransaction', callback: (transaction: Transaction) => void): void;
on(hook: 'finishTransaction', callback: (transaction: Transaction) => void): void;
/**
* Register a callback for transaction start and finish.
*/
on?(hook: 'beforeEnvelope', callback: (envelope: Envelope) => void): void;
on(hook: 'beforeEnvelope', callback: (envelope: Envelope) => void): void;
/**

@@ -200,3 +187,3 @@ * Register a callback for before sending an event.

*/
on?(hook: 'beforeSendEvent', callback: (event: Event, hint?: EventHint | undefined) => void): void;
on(hook: 'beforeSendEvent', callback: (event: Event, hint?: EventHint | undefined) => void): void;
/**

@@ -207,15 +194,15 @@ * Register a callback for preprocessing an event,

*/
on?(hook: 'preprocessEvent', callback: (event: Event, hint?: EventHint | undefined) => void): void;
on(hook: 'preprocessEvent', callback: (event: Event, hint?: EventHint | undefined) => void): void;
/**
* Register a callback for when an event has been sent.
*/
on?(hook: 'afterSendEvent', callback: (event: Event, sendResponse: TransportMakeRequestResponse | void) => void): void;
on(hook: 'afterSendEvent', callback: (event: Event, sendResponse: TransportMakeRequestResponse | void) => void): void;
/**
* Register a callback before a breadcrumb is added.
*/
on?(hook: 'beforeAddBreadcrumb', callback: (breadcrumb: Breadcrumb, hint?: BreadcrumbHint) => void): void;
on(hook: 'beforeAddBreadcrumb', callback: (breadcrumb: Breadcrumb, hint?: BreadcrumbHint) => void): void;
/**
* Register a callback when a DSC (Dynamic Sampling Context) is created.
*/
on?(hook: 'createDsc', callback: (dsc: DynamicSamplingContext) => void): void;
on(hook: 'createDsc', callback: (dsc: DynamicSamplingContext) => void): void;
/**

@@ -225,3 +212,3 @@ * Register a callback when an OpenTelemetry span is ended (in @sentry/opentelemetry-node).

*/
on?(hook: 'otelSpanEnd', callback: (otelSpan: unknown, mutableOptions: {
on(hook: 'otelSpanEnd', callback: (otelSpan: unknown, mutableOptions: {
drop: boolean;

@@ -234,18 +221,26 @@ }) => void): void;

*/
on?(hook: 'beforeSendFeedback', callback: (feedback: FeedbackEvent, options?: {
on(hook: 'beforeSendFeedback', callback: (feedback: FeedbackEvent, options?: {
includeReplay?: boolean;
}) => void): void;
/**
* A hook for BrowserTracing to trigger a span start for a page load.
* A hook for the browser tracing integrations to trigger a span start for a page load.
*/
on?(hook: 'startPageLoadSpan', callback: (options: StartSpanOptions) => void): void;
on(hook: 'startPageLoadSpan', callback: (options: StartSpanOptions) => void): void;
/**
* A hook for BrowserTracing to trigger a span for a navigation.
* A hook for browser tracing integrations to trigger a span for a navigation.
*/
on?(hook: 'startNavigationSpan', callback: (options: StartSpanOptions) => void): void;
on(hook: 'startNavigationSpan', callback: (options: StartSpanOptions) => void): void;
/**
* A hook that is called when the client is flushing
*/
on(hook: 'flush', callback: () => void): void;
/**
* A hook that is called when the client is closing
*/
on(hook: 'close', callback: () => void): void;
/**
* Fire a hook event for transaction start.
* Expects to be given a transaction as the second argument.
*/
emit?(hook: 'startTransaction', transaction: Transaction): void;
emit(hook: 'startTransaction', transaction: Transaction): void;
/**

@@ -255,4 +250,4 @@ * Fire a hook event for transaction finish.

*/
emit?(hook: 'finishTransaction', transaction: Transaction): void;
emit?(hook: 'beforeEnvelope', envelope: Envelope): void;
emit(hook: 'finishTransaction', transaction: Transaction): void;
emit(hook: 'beforeEnvelope', envelope: Envelope): void;
/**

@@ -263,3 +258,3 @@ * Fire a hook event before sending an event.

*/
emit?(hook: 'beforeSendEvent', event: Event, hint?: EventHint): void;
emit(hook: 'beforeSendEvent', event: Event, hint?: EventHint): void;
/**

@@ -269,12 +264,12 @@ * Fire a hook event to process events before they are passed to (global) event processors.

*/
emit?(hook: 'preprocessEvent', event: Event, hint?: EventHint): void;
emit?(hook: 'afterSendEvent', event: Event, sendResponse: TransportMakeRequestResponse | void): void;
emit(hook: 'preprocessEvent', event: Event, hint?: EventHint): void;
emit(hook: 'afterSendEvent', event: Event, sendResponse: TransportMakeRequestResponse | void): void;
/**
* Fire a hook for when a breadcrumb is added. Expects the breadcrumb as second argument.
*/
emit?(hook: 'beforeAddBreadcrumb', breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void;
emit(hook: 'beforeAddBreadcrumb', breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void;
/**
* Fire a hook for when a DSC (Dynamic Sampling Context) is created. Expects the DSC as second argument.
*/
emit?(hook: 'createDsc', dsc: DynamicSamplingContext): void;
emit(hook: 'createDsc', dsc: DynamicSamplingContext): void;
/**

@@ -285,3 +280,3 @@ * Fire a hook for when an OpenTelemetry span is ended (in @sentry/opentelemetry-node).

*/
emit?(hook: 'otelSpanEnd', otelSpan: unknown, mutableOptions: {
emit(hook: 'otelSpanEnd', otelSpan: unknown, mutableOptions: {
drop: boolean;

@@ -294,14 +289,22 @@ }): void;

*/
emit?(hook: 'beforeSendFeedback', feedback: FeedbackEvent, options?: {
emit(hook: 'beforeSendFeedback', feedback: FeedbackEvent, options?: {
includeReplay?: boolean;
}): void;
/**
* Emit a hook event for BrowserTracing to trigger a span start for a page load.
* Emit a hook event for browser tracing integrations to trigger a span start for a page load.
*/
emit?(hook: 'startPageLoadSpan', options: StartSpanOptions): void;
emit(hook: 'startPageLoadSpan', options: StartSpanOptions): void;
/**
* Emit a hook event for BrowserTracing to trigger a span for a navigation.
* Emit a hook event for browser tracing integrations to trigger a span for a navigation.
*/
emit?(hook: 'startNavigationSpan', options: StartSpanOptions): void;
emit(hook: 'startNavigationSpan', options: StartSpanOptions): void;
/**
* Emit a hook event for client flush
*/
emit(hook: 'flush'): void;
/**
* Emit a hook event for client close
*/
emit(hook: 'close'): void;
}
//# sourceMappingURL=client.d.ts.map

@@ -1,2 +0,2 @@

export type DataCategory = 'default' | 'error' | 'transaction' | 'replay' | 'security' | 'attachment' | 'session' | 'internal' | 'profile' | 'monitor' | 'feedback' | 'unknown' | 'span';
export type DataCategory = 'default' | 'error' | 'transaction' | 'replay' | 'security' | 'attachment' | 'session' | 'internal' | 'profile' | 'monitor' | 'feedback' | 'unknown';
//# sourceMappingURL=datacategory.d.ts.map

@@ -10,3 +10,2 @@ import { SerializedCheckIn } from './checkin';

import { SerializedSession, Session, SessionAggregates } from './session';
import { Span } from './span';
import { Transaction } from './transaction';

@@ -21,10 +20,6 @@ import { UserFeedback } from './user';

transaction?: string;
/**
* @deprecated Functonality for segment has been removed.
*/
user_segment?: string;
replay_id?: string;
sampled?: string;
};
export type EnvelopeItemType = 'client_report' | 'user_report' | 'feedback' | 'session' | 'sessions' | 'transaction' | 'attachment' | 'event' | 'profile' | 'replay_event' | 'replay_recording' | 'check_in' | 'statsd' | 'span';
export type EnvelopeItemType = 'client_report' | 'user_report' | 'feedback' | 'session' | 'sessions' | 'transaction' | 'attachment' | 'event' | 'profile' | 'replay_event' | 'replay_recording' | 'check_in' | 'statsd';
export type BaseEnvelopeHeaders = {

@@ -90,5 +85,2 @@ [key: string]: unknown;

};
type SpanItemHeaders = {
type: 'span';
};
export type EventItem = BaseEnvelopeItem<EventItemHeaders, Event>;

@@ -105,3 +97,2 @@ export type AttachmentItem = BaseEnvelopeItem<AttachmentItemHeaders, string | Uint8Array>;

export type ProfileItem = BaseEnvelopeItem<ProfileItemHeaders, Profile>;
export type SpanItem = BaseEnvelopeItem<SpanItemHeaders, Span>;
export type EventEnvelopeHeaders = {

@@ -121,3 +112,2 @@ event_id: string;

type StatsdEnvelopeHeaders = BaseEnvelopeHeaders;
type SpanEnvelopeHeaders = BaseEnvelopeHeaders;
export type EventEnvelope = BaseEnvelope<EventEnvelopeHeaders, EventItem | AttachmentItem | UserFeedbackItem | FeedbackItem | ProfileItem>;

@@ -135,6 +125,5 @@ export type SessionEnvelope = BaseEnvelope<SessionEnvelopeHeaders, SessionItem>;

export type StatsdEnvelope = BaseEnvelope<StatsdEnvelopeHeaders, StatsdItem>;
export type SpanEnvelope = BaseEnvelope<SpanEnvelopeHeaders, SpanItem>;
export type Envelope = EventEnvelope | SessionEnvelope | ClientReportEnvelope | ReplayEnvelope | CheckInEnvelope | StatsdEnvelope | SpanEnvelope;
export type Envelope = EventEnvelope | SessionEnvelope | ClientReportEnvelope | ReplayEnvelope | CheckInEnvelope | StatsdEnvelope;
export type EnvelopeItem = Envelope[1][number];
export {};
//# sourceMappingURL=envelope.d.ts.map

@@ -13,3 +13,3 @@ import { Attachment } from './attachment';

import { SdkInfo } from './sdkinfo';
import { Severity, SeverityLevel } from './severity';
import { SeverityLevel } from './severity';
import { MetricSummary, Span, SpanJSON } from './span';

@@ -29,3 +29,3 @@ import { Thread } from './thread';

start_timestamp?: number;
level?: Severity | SeverityLevel;
level?: SeverityLevel;
platform?: string;

@@ -32,0 +32,0 @@ logger?: string;

@@ -9,3 +9,3 @@ import { Breadcrumb, BreadcrumbHint } from './breadcrumb';

import { Session } from './session';
import { Severity, SeverityLevel } from './severity';
import { SeverityLevel } from './severity';
import { CustomSamplingContext, Transaction, TransactionContext } from './transaction';

@@ -77,3 +77,3 @@ import { User } from './user';

*/
getClient(): Client | undefined;
getClient<C extends Client>(): C | undefined;
/**

@@ -111,3 +111,3 @@ * Returns the scope of the top stack.

*/
captureMessage(message: string, level?: Severity | SeverityLevel, hint?: EventHint): string;
captureMessage(message: string, level?: SeverityLevel, hint?: EventHint): string;
/**

@@ -123,10 +123,2 @@ * Captures a manually created event and sends it to Sentry.

/**
* This is the getter for lastEventId.
*
* @returns The last event id of a captured event.
*
* @deprecated This will be removed in v8.
*/
lastEventId(): string | undefined;
/**
* Records a new breadcrumb which will be attached to future events.

@@ -198,17 +190,2 @@ *

/**
* Callback to set context information onto the scope.
*
* @param callback Callback function that receives Scope.
* @deprecated Use `getScope()` directly.
*/
configureScope(callback: (scope: Scope) => void): void;
/**
* For the duration of the callback, this hub will be set as the global current Hub.
* This function is useful if you want to run your own client and hook into an already initialized one
* e.g.: Reporting issues to your own sentry when running in your component while still using the users configuration.
*
* TODO v8: This will be merged with `withScope()`
*/
run(callback: (hub: Hub) => void): void;
/**
* Returns the integration if installed on the current client.

@@ -220,10 +197,2 @@ *

/**
* Returns all trace headers that are currently on the top scope.
*
* @deprecated Use `spanToTraceHeader()` instead.
*/
traceHeaders(): {
[key: string]: string;
};
/**
* Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.

@@ -230,0 +199,0 @@ *

@@ -9,3 +9,3 @@ export { Attachment } from './attachment';

export { DebugImage, DebugMeta } from './debugMeta';
export { AttachmentItem, BaseEnvelopeHeaders, BaseEnvelopeItemHeaders, ClientReportEnvelope, ClientReportItem, DynamicSamplingContext, Envelope, EnvelopeItemType, EnvelopeItem, EventEnvelope, EventEnvelopeHeaders, EventItem, ReplayEnvelope, FeedbackItem, SessionEnvelope, SessionItem, UserFeedbackItem, CheckInItem, CheckInEnvelope, StatsdItem, StatsdEnvelope, ProfileItem, SpanEnvelope, SpanItem, } from './envelope';
export { AttachmentItem, BaseEnvelopeHeaders, BaseEnvelopeItemHeaders, ClientReportEnvelope, ClientReportItem, DynamicSamplingContext, Envelope, EnvelopeItemType, EnvelopeItem, EventEnvelope, EventEnvelopeHeaders, EventItem, ReplayEnvelope, FeedbackItem, SessionEnvelope, SessionItem, UserFeedbackItem, CheckInItem, CheckInEnvelope, StatsdItem, StatsdEnvelope, ProfileItem, } from './envelope';
export { ExtendedError } from './error';

@@ -32,7 +32,6 @@ export { Event, EventHint, EventType, ErrorEvent, TransactionEvent, SerializedEvent } from './event';

export { SessionAggregates, AggregationCounts, Session, SessionContext, SessionStatus, RequestSession, RequestSessionStatus, SessionFlusherLike, SerializedSession, } from './session';
export { Severity, SeverityLevel } from './severity';
export { SeverityLevel } from './severity';
export { Span, SpanContext, SpanOrigin, SpanAttributeValue, SpanAttributes, SpanTimeInput, SpanJSON, SpanContextData, TraceFlag, MetricSummary, } from './span';
export { StackFrame } from './stackframe';
export { Stacktrace, StackParser, StackLineParser, StackLineParserFn } from './stacktrace';
export { TextEncoderInternal } from './textencoder';
export { PropagationContext, TracePropagationTargets } from './tracing';

@@ -47,3 +46,2 @@ export { StartSpanOptions } from './startSpanOptions';

export { WrappedFunction } from './wrappedfunction';
export { Instrumenter } from './instrumenter';
export { HandlerDataFetch, HandlerDataXhr, HandlerDataDom, HandlerDataConsole, HandlerDataHistory, HandlerDataError, HandlerDataUnhandledRejection, ConsoleLevel, SentryXhrData, SentryWrappedXMLHttpRequest, } from './instrument';

@@ -50,0 +48,0 @@ export { BrowserClientReplayOptions, BrowserClientProfilingOptions } from './browseroptions';

@@ -23,6 +23,4 @@ import { Client } from './client';

* It does not receives any arguments, and should only use for e.g. global monkey patching and similar things.
*
* NOTE: In v8, this will become optional.
*/
setupOnce(): void;
setupOnce?(): void;
/**

@@ -67,6 +65,4 @@ * Set up an integration for the given client.

* It does not receives any arguments, and should only use for e.g. global monkey patching and similar things.
*
* NOTE: In v8, this will become optional, and not receive any arguments anymore.
*/
setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void;
setupOnce?(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void;
/**

@@ -73,0 +69,0 @@ * Set up an integration for the given client.

import { Breadcrumb, BreadcrumbHint } from './breadcrumb';
import { ErrorEvent, Event, EventHint, TransactionEvent } from './event';
import { Instrumenter } from './instrumenter';
import { Integration } from './integration';

@@ -53,10 +52,2 @@ import { CaptureContext } from './scope';

/**
* The instrumenter to use. Defaults to `sentry`.
* When not set to `sentry`, auto-instrumentation inside of Sentry will be disabled,
* in favor of using external auto instrumentation.
*
* NOTE: Any option except for `sentry` is highly experimental and subject to change!
*/
instrumenter?: Instrumenter;
/**
* A function that takes transport options and returns the Transport object which is used to send events to Sentry.

@@ -195,18 +186,27 @@ * The function is invoked internally when the client is initialized.

/**
* List of strings/regex controlling to which outgoing requests
* the SDK will attach tracing headers.
* List of strings and/or Regular Expressions used to determine which outgoing requests will have `sentry-trace` and `baggage`
* headers attached.
*
* By default the SDK will attach those headers to all requests to localhost
* and same origin. If this option is provided, the SDK will match the
* request URL of outgoing requests against the items in this
* array, and only attach tracing headers if a match was found.
* **Default:** If this option is not provided, tracing headers will be attached to all outgoing requests.
* If you are using a browser SDK, by default, tracing headers will only be attached to outgoing requests to the same origin.
*
* @example
* ```js
* Sentry.init({
* tracePropagationTargets: ['api.site.com'],
* });
* ```
* **Disclaimer:** Carelessly setting this option in browser environments may result into CORS errors!
* Only attach tracing headers to requests to the same origin, or to requests to services you can control CORS headers of.
* Cross-origin requests, meaning requests to a different domain, for example a request to `https://api.example.com/` while you're on `https://example.com/`, take special care.
* If you are attaching headers to cross-origin requests, make sure the backend handling the request returns a `"Access-Control-Allow-Headers: sentry-trace, baggage"` header to ensure your requests aren't blocked.
*
* Default: ['localhost', /^\//] {@see DEFAULT_TRACE_PROPAGATION_TARGETS}
* If you provide a `tracePropagationTargets` array, the entries you provide will be matched against the entire URL of the outgoing request.
* If you are using a browser SDK, the entries will also be matched against the pathname of the outgoing requests.
* This is so you can have matchers for relative requests, for example, `/^\/api/` if you want to trace requests to your `/api` routes on the same domain.
*
* If any of the two match any of the provided values, tracing headers will be attached to the outgoing request.
* Both, the string values, and the RegExes you provide in the array will match if they partially match the URL or pathname.
*
* Examples:
* - `tracePropagationTargets: [/^\/api/]` and request to `https://same-origin.com/api/posts`:
* - Tracing headers will be attached because the request is sent to the same origin and the regex matches the pathname "/api/posts".
* - `tracePropagationTargets: [/^\/api/]` and request to `https://different-origin.com/api/posts`:
* - Tracing headers will not be attached because the pathname will only be compared when the request target lives on the same origin.
* - `tracePropagationTargets: [/^\/api/, 'https://external-api.com']` and request to `https://external-api.com/v1/data`:
* - Tracing headers will be attached because the request URL matches the string `'https://external-api.com'`.
*/

@@ -213,0 +213,0 @@ tracePropagationTargets?: TracePropagationTargets;

@@ -10,3 +10,3 @@ import { Attachment } from './attachment';

import { RequestSession, Session } from './session';
import { Severity, SeverityLevel } from './severity';
import { SeverityLevel } from './severity';
import { Span } from './span';

@@ -21,3 +21,3 @@ import { PropagationContext } from './tracing';

user: User;
level: Severity | SeverityLevel;
level: SeverityLevel;
extra: Extras;

@@ -53,3 +53,3 @@ contexts: Contexts;

/**
* Holds additional event information. {@link Scope.applyToEvent} will be called by the client before an event is sent.
* Holds additional event information.
*/

@@ -66,4 +66,4 @@ export interface Scope {

*/
getClient(): Client | undefined;
/** Add new event processor that will be called after {@link applyToEvent}. */
getClient<C extends Client>(): C | undefined;
/** Add new event processor that will be called during event processing. */
addEventProcessor(callback: EventProcessor): this;

@@ -118,3 +118,3 @@ /** Get the data of this scope, which is applied to an event during processing. */

*/
setLevel(level: Severity | SeverityLevel): this;
setLevel(level: SeverityLevel): this;
/**

@@ -239,3 +239,7 @@ * Sets the transaction name on the scope for future events.

captureEvent(event: Event, hint?: EventHint): string;
/**
* Clone all data from this scope into a new scope.
*/
clone(): Scope;
}
//# sourceMappingURL=scope.d.ts.map

@@ -1,20 +0,2 @@

/**
* @deprecated Please use a `SeverityLevel` string instead of the `Severity` enum. Acceptable values are 'fatal',
* 'error', 'warning', 'log', 'info', and 'debug'.
*/
export declare enum Severity {
/** JSDoc */
Fatal = "fatal",
/** JSDoc */
Error = "error",
/** JSDoc */
Warning = "warning",
/** JSDoc */
Log = "log",
/** JSDoc */
Info = "info",
/** JSDoc */
Debug = "debug"
}
export type SeverityLevel = 'fatal' | 'error' | 'warning' | 'log' | 'info' | 'debug';
//# sourceMappingURL=severity.d.ts.map

@@ -1,7 +0,4 @@

import { TraceContext } from './context';
import { Instrumenter } from './instrumenter';
import { Measurements } from './measurement';
import { Primitive } from './misc';
import { HrTime } from './opentelemetry';
import { Transaction } from './transaction';
import { TransactionSource } from './transaction';
type SpanOriginType = 'manual' | 'auto';

@@ -16,3 +13,3 @@ type SpanOriginCategory = string;

'sentry.op': string;
'sentry.source': string;
'sentry.source': TransactionSource;
'sentry.sample_rate': number;

@@ -48,4 +45,4 @@ }> & Record<string, SpanAttributeValue | undefined>;

}
type TraceFlagNone = 0x0;
type TraceFlagSampled = 0x1;
type TraceFlagNone = 0;
type TraceFlagSampled = 1;
export type TraceFlag = TraceFlagNone | TraceFlagSampled;

@@ -77,16 +74,14 @@ export interface SpanContextData {

* data out-of-band leaves this flag unset.
* We allow number here because otel also does, so we can't be stricter than them.
*/
traceFlags: TraceFlag;
traceFlags: TraceFlag | number;
}
/** Interface holding all properties that can be set on a Span on creation. */
/**
* Interface holding all properties that can be set on a Span on creation.
* This is only used for the legacy span/transaction creation and will go away in v8.
*/
export interface SpanContext {
/**
* Description of the Span.
*
* @deprecated Use `name` instead.
* Human-readable identifier for the span.
*/
description?: string | undefined;
/**
* Human-readable identifier for the span. Alias for span.description.
*/
name?: string | undefined;

@@ -98,7 +93,2 @@ /**

/**
* Completion status of the Span.
* See: {@sentry/tracing SpanStatus} for possible values
*/
status?: string | undefined;
/**
* Parent Span ID

@@ -146,108 +136,11 @@ */

/**
* The instrumenter that created this span.
*/
instrumenter?: Instrumenter | undefined;
/**
* The origin of the span, giving context about what created the span.
*/
origin?: SpanOrigin | undefined;
/**
* Exclusive time in milliseconds.
*/
exclusiveTime?: number;
/**
* Measurements of the Span.
*/
measurements?: Measurements;
}
/** Span holding trace_id, span_id */
export interface Span extends Pick<SpanContext, Exclude<keyof SpanContext, 'op' | 'status' | 'origin'>> {
/**
* A generic Span which holds trace data.
*/
export interface Span {
/**
* Human-readable identifier for the span. Identical to span.description.
* @deprecated Use `spanToJSON(span).description` instead.
*/
name: string;
/**
* Operation of the Span.
*
* @deprecated Use `startSpan()` functions to set, `span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_OP, 'op')
* to update and `spanToJSON().op` to read the op instead
*/
op?: string | undefined;
/**
* The ID of the span.
* @deprecated Use `spanContext().spanId` instead.
*/
spanId: string;
/**
* Parent Span ID
*
* @deprecated Use `spanToJSON(span).parent_span_id` instead.
*/
parentSpanId?: string | undefined;
/**
* The ID of the trace.
* @deprecated Use `spanContext().traceId` instead.
*/
traceId: string;
/**
* Was this span chosen to be sent as part of the sample?
* @deprecated Use `isRecording()` instead.
*/
sampled?: boolean | undefined;
/**
* Timestamp in seconds (epoch time) indicating when the span started.
* @deprecated Use `spanToJSON()` instead.
*/
startTimestamp: number;
/**
* Timestamp in seconds (epoch time) indicating when the span ended.
* @deprecated Use `spanToJSON()` instead.
*/
endTimestamp?: number | undefined;
/**
* Tags for the span.
* @deprecated Use `spanToJSON(span).atttributes` instead.
*/
tags: {
[key: string]: Primitive;
};
/**
* Data for the span.
* @deprecated Use `spanToJSON(span).atttributes` instead.
*/
data: {
[key: string]: any;
};
/**
* Attributes for the span.
* @deprecated Use `spanToJSON(span).atttributes` instead.
*/
attributes: SpanAttributes;
/**
* The transaction containing this span
* @deprecated Use top level `Sentry.getRootSpan()` instead
*/
transaction?: Transaction;
/**
* The instrumenter that created this span.
*
* @deprecated this field will be removed.
*/
instrumenter: Instrumenter;
/**
* Completion status of the Span.
*
* See: {@sentry/tracing SpanStatus} for possible values
*
* @deprecated Use `.setStatus` to set or update and `spanToJSON()` to read the status.
*/
status?: string | undefined;
/**
* The origin of the span, giving context about what created the span.
*
* @deprecated Use `startSpan` function to set and `spanToJSON(span).origin` to read the origin instead.
*/
origin?: SpanOrigin | undefined;
/**
* Get context data for this span.

@@ -258,10 +151,2 @@ * This includes the spanId & the traceId.

/**
* Sets the finish timestamp on the current span.
*
* @param endTimestamp Takes an endTimestamp if the end should not be the time when you call this function.
*
* @deprecated Use `.end()` instead.
*/
finish(endTimestamp?: number): void;
/**
* End the current span.

@@ -271,19 +156,2 @@ */

/**
* Sets the tag attribute on the current span.
*
* Can also be used to unset a tag, by passing `undefined`.
*
* @param key Tag key
* @param value Tag value
* @deprecated Use `setAttribute()` instead.
*/
setTag(key: string, value: Primitive): this;
/**
* Sets the data attribute on the current span
* @param key Data key
* @param value Data value
* @deprecated Use `setAttribute()` instead.
*/
setData(key: string, value: any): this;
/**
* Set a single attribute on the span.

@@ -300,3 +168,3 @@ * Set it to `undefined` to remove the attribute.

* Sets the status attribute on the current span
* See: {@sentry/tracing SpanStatus} for possible values
* See: {@sentry/core SpanStatusType} for possible values
* @param status http code used to set the status

@@ -306,14 +174,2 @@ */

/**
* Sets the status attribute on the current span based on the http code
* @param httpStatus http code used to set the status
* @deprecated Use top-level `setHttpStatus()` instead.
*/
setHttpStatus(httpStatus: number): this;
/**
* Set the name of the span.
*
* @deprecated Use `updateName()` instead.
*/
setName(name: string): void;
/**
* Update the name of the span.

@@ -323,40 +179,2 @@ */

/**
* Creates a new `Span` while setting the current `Span.id` as `parentSpanId`.
* Also the `sampled` decision will be inherited.
*
* @deprecated Use `startSpan()`, `startSpanManual()` or `startInactiveSpan()` instead.
*/
startChild(spanContext?: Pick<SpanContext, Exclude<keyof SpanContext, 'sampled' | 'traceId' | 'parentSpanId'>>): Span;
/**
* Determines whether span was successful (HTTP200)
*
* @deprecated Use `spanToJSON(span).status === 'ok'` instead.
*/
isSuccess(): boolean;
/**
* Return a traceparent compatible header string.
* @deprecated Use `spanToTraceHeader()` instead.
*/
toTraceparent(): string;
/**
* Returns the current span properties as a `SpanContext`.
* @deprecated Use `toJSON()` or access the fields directly instead.
*/
toContext(): SpanContext;
/**
* Updates the current span with a new `SpanContext`.
* @deprecated Update the fields directly instead.
*/
updateWithContext(spanContext: SpanContext): this;
/**
* Convert the object to JSON for w. spans array info only.
* @deprecated Use `spanToTraceContext()` util function instead.
*/
getTraceContext(): TraceContext;
/**
* Convert the object to JSON.
* @deprecated Use `spanToJSON(span)` instead.
*/
toJSON(): SpanJSON;
/**
* If this is span is actually recording data.

@@ -363,0 +181,0 @@ * This will return false if tracing is disabled, this span was not sampled or if the span is already finished.

@@ -1,2 +0,1 @@

import { Instrumenter } from './instrumenter';
import { Primitive } from './misc';

@@ -44,7 +43,2 @@ import { Scope } from './scope';

/**
* The name thingy.
* @deprecated Use `name` instead.
*/
description?: string;
/**
* @deprecated Use `span.setStatus()` instead.

@@ -93,7 +87,3 @@ */

endTimestamp?: number;
/**
* @deprecated You cannot set the instrumenter manually anymore.
*/
instrumenter?: Instrumenter;
}
//# sourceMappingURL=startSpanOptions.d.ts.map
import { Context } from './context';
import { DynamicSamplingContext } from './envelope';
import { Instrumenter } from './instrumenter';
import { MeasurementUnit } from './measurement';

@@ -36,13 +35,21 @@ import { ExtractedNodeRequestData, Primitive, WorkerLocation } from './misc';

*/
export type TraceparentData = Pick<TransactionContext, 'traceId' | 'parentSpanId' | 'parentSampled'>;
export interface TraceparentData {
/**
* Trace ID
*/
traceId?: string | undefined;
/**
* Parent Span ID
*/
parentSpanId?: string | undefined;
/**
* If this transaction has a parent, the parent's sampling decision
*/
parentSampled?: boolean | undefined;
}
/**
* Transaction "Class", inherits Span only has `setName`
*/
export interface Transaction extends TransactionContext, Pick<Span, Exclude<keyof Span, 'setName' | 'name'>> {
export interface Transaction extends Pick<TransactionContext, Exclude<keyof TransactionContext, 'name' | 'op'>>, Span {
/**
* Human-readable identifier for the transaction.
* @deprecated Use `spanToJSON(span).description` instead.
*/
name: string;
/**
* The ID of the transaction.

@@ -91,14 +98,2 @@ * @deprecated Use `spanContext().spanId` instead.

/**
* The instrumenter that created this transaction.
*
* @deprecated This field will be removed in v8.
*/
instrumenter: Instrumenter;
/**
* Set the name of the transaction
*
* @deprecated Use `.updateName()` and `.setAttribute()` instead.
*/
setName(name: string, source?: TransactionMetadata['source']): void;
/**
* Set the context of a transaction event.

@@ -124,7 +119,2 @@ * @deprecated Use either `.setAttribute()`, or set the context on the scope before creating the transaction.

/**
* Updates the current transaction with a new `TransactionContext`.
* @deprecated Update the fields directly instead.
*/
updateWithContext(transactionContext: TransactionContext): this;
/**
* Set metadata for this transaction.

@@ -141,6 +131,8 @@ * @deprecated Use attributes or store data on the scope instead.

/**
* Get the profile id from the transaction
* @deprecated Use `toJSON()` or access the fields directly instead.
* Creates a new `Span` while setting the current `Span.id` as `parentSpanId`.
* Also the `sampled` decision will be inherited.
*
* @deprecated Use `startSpan()`, `startSpanManual()` or `startInactiveSpan()` instead.
*/
getProfileId(): string | undefined;
startChild(spanContext?: Pick<SpanContext, Exclude<keyof SpanContext, 'sampled' | 'traceId' | 'parentSpanId'>>): Span;
}

@@ -190,9 +182,2 @@ /**

request?: PolymorphicRequest;
/** Compatibility shim for transitioning to the `RequestData` integration. The options passed to our Express request
* handler controlling what request data is added to the event.
* TODO (v8): This should go away
*/
requestDataOptionsFromExpressHandler?: {
[key: string]: unknown;
};
/** For transactions tracing server-side request handling, the path of the request being tracked. */

@@ -202,7 +187,2 @@ /** TODO: If we rm -rf `instrumentServer`, this can go, too */

/**
* Information on how a transaction name was generated.
* @deprecated Use `SEMANTIC_ATTRIBUTE_SENTRY_SOURCE` attribute instead.
*/
source: TransactionSource;
/**
* Metadata for the transaction's spans, keyed by spanId.

@@ -209,0 +189,0 @@ * @deprecated This will be removed in v8.

import { Client } from './client';
import { Envelope } from './envelope';
import { TextEncoderInternal } from './textencoder';
export type TransportRequest = {

@@ -18,3 +17,2 @@ body: string | Uint8Array;

recordDroppedEvent: Client['recordDroppedEvent'];
textEncoder?: TextEncoderInternal;
}

@@ -21,0 +19,0 @@ export interface BaseTransportOptions extends InternalBaseTransportOptions {

@@ -10,6 +10,2 @@ /**

username?: string;
/**
* @deprecated Functonality for segment has been removed. Use a custom tag or context instead to capture this information.
*/
segment?: string;
}

@@ -16,0 +12,0 @@ export interface UserFeedback {

@@ -0,7 +1,28 @@

/**
* An attachment to an event. This is used to upload arbitrary data to Sentry.
*
* Please take care to not add sensitive information in attachments.
*
* https://develop.sentry.dev/sdk/envelopes/#attachment
*/
export interface Attachment {
/**
* The attachment data. Can be a string or a binary data (byte array)
*/
data: string | Uint8Array;
/**
* The name of the uploaded file without a path component
*/
filename: string;
/**
* The content type of the attachment payload. Defaults to `application/octet-stream` if not specified.
*
* Any valid [media type](https://www.iana.org/assignments/media-types/media-types.xhtml) is allowed.
*/
contentType?: string;
attachmentType?: string;
/**
* The type of the attachment. Defaults to `event.attachment` if not specified.
*/
attachmentType?: 'event.attachment' | 'event.minidump' | 'event.applecrashreport' | 'unreal.context' | 'unreal.logs';
}
//# sourceMappingURL=attachment.d.ts.map

@@ -1,6 +0,6 @@

import type { Severity, SeverityLevel } from './severity';
import type { SeverityLevel } from './severity';
/** JSDoc */
export interface Breadcrumb {
type?: string;
level?: Severity | SeverityLevel;
level?: SeverityLevel;
event_id?: string;

@@ -7,0 +7,0 @@ category?: string;

@@ -11,3 +11,2 @@ import type { Breadcrumb, BreadcrumbHint } from './breadcrumb';

import type { Integration, IntegrationClass } from './integration';
import type { MetricBucketItem } from './metrics';
import type { ClientOptions } from './options';

@@ -18,3 +17,3 @@ import type { ParameterizedString } from './parameterize';

import type { Session, SessionAggregates } from './session';
import type { Severity, SeverityLevel } from './severity';
import type { SeverityLevel } from './severity';
import type { StartSpanOptions } from './startSpanOptions';

@@ -51,3 +50,3 @@ import type { Transaction } from './transaction';

*/
captureMessage(message: string, level?: Severity | SeverityLevel, hint?: EventHint, scope?: Scope): string | undefined;
captureMessage(message: string, level?: SeverityLevel, hint?: EventHint, scope?: Scope): string | undefined;
/**

@@ -67,3 +66,3 @@ * Captures a manually created event and sends it to Sentry.

*/
captureSession?(session: Session): void;
captureSession(session: Session): void;
/**

@@ -86,5 +85,4 @@ * Create a cron monitor check in and send it to Sentry. This method is not available on all clients.

*
* TODO (v8): Make this a required method.
*/
getSdkMetadata?(): SdkMetadata | undefined;
getSdkMetadata(): SdkMetadata | undefined;
/**

@@ -117,12 +115,8 @@ * Returns the transport that is used by the client.

* Adds an event processor that applies to any event processed by this client.
*
* TODO (v8): Make this a required method.
*/
addEventProcessor?(eventProcessor: EventProcessor): void;
addEventProcessor(eventProcessor: EventProcessor): void;
/**
* Get all added event processors for this client.
*
* TODO (v8): Make this a required method.
*/
getEventProcessors?(): EventProcessor[];
getEventProcessors(): EventProcessor[];
/**

@@ -134,3 +128,3 @@ * Returns the client's instance of the given integration class, it any.

/** Get the instance of the integration with the given name on the client, if it was added. */
getIntegrationByName?<T extends Integration = Integration>(name: string): T | undefined;
getIntegrationByName<T extends Integration = Integration>(name: string): T | undefined;
/**

@@ -142,5 +136,4 @@ * Add an integration to the client.

*
* TODO (v8): Make this a required method.
* */
addIntegration?(integration: Integration): void;
addIntegration(integration: Integration): void;
/**

@@ -155,7 +148,7 @@ * This is an internal function to setup all integrations that should run on the client.

*/
init?(): void;
init(): void;
/** Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`. */
eventFromException(exception: any, hint?: EventHint): PromiseLike<Event>;
/** Creates an {@link Event} from primitive inputs to `captureMessage`. */
eventFromMessage(message: ParameterizedString, level?: Severity | SeverityLevel, hint?: EventHint): PromiseLike<Event>;
eventFromMessage(message: ParameterizedString, level?: SeverityLevel, hint?: EventHint): PromiseLike<Event>;
/** Submits the event to Sentry */

@@ -174,12 +167,6 @@ sendEvent(event: Event, hint?: EventHint): void;

/**
* Captures serialized metrics and sends them to Sentry.
*
* @experimental This API is experimental and might experience breaking changes
*/
captureAggregateMetrics?(metricBucketItems: Array<MetricBucketItem>): void;
/**
* Register a callback for transaction start.
* Receives the transaction as argument.
*/
on?(hook: 'startTransaction', callback: (transaction: Transaction) => void): void;
on(hook: 'startTransaction', callback: (transaction: Transaction) => void): void;
/**

@@ -189,7 +176,7 @@ * Register a callback for transaction finish.

*/
on?(hook: 'finishTransaction', callback: (transaction: Transaction) => void): void;
on(hook: 'finishTransaction', callback: (transaction: Transaction) => void): void;
/**
* Register a callback for transaction start and finish.
*/
on?(hook: 'beforeEnvelope', callback: (envelope: Envelope) => void): void;
on(hook: 'beforeEnvelope', callback: (envelope: Envelope) => void): void;
/**

@@ -200,3 +187,3 @@ * Register a callback for before sending an event.

*/
on?(hook: 'beforeSendEvent', callback: (event: Event, hint?: EventHint | undefined) => void): void;
on(hook: 'beforeSendEvent', callback: (event: Event, hint?: EventHint | undefined) => void): void;
/**

@@ -207,15 +194,15 @@ * Register a callback for preprocessing an event,

*/
on?(hook: 'preprocessEvent', callback: (event: Event, hint?: EventHint | undefined) => void): void;
on(hook: 'preprocessEvent', callback: (event: Event, hint?: EventHint | undefined) => void): void;
/**
* Register a callback for when an event has been sent.
*/
on?(hook: 'afterSendEvent', callback: (event: Event, sendResponse: TransportMakeRequestResponse | void) => void): void;
on(hook: 'afterSendEvent', callback: (event: Event, sendResponse: TransportMakeRequestResponse | void) => void): void;
/**
* Register a callback before a breadcrumb is added.
*/
on?(hook: 'beforeAddBreadcrumb', callback: (breadcrumb: Breadcrumb, hint?: BreadcrumbHint) => void): void;
on(hook: 'beforeAddBreadcrumb', callback: (breadcrumb: Breadcrumb, hint?: BreadcrumbHint) => void): void;
/**
* Register a callback when a DSC (Dynamic Sampling Context) is created.
*/
on?(hook: 'createDsc', callback: (dsc: DynamicSamplingContext) => void): void;
on(hook: 'createDsc', callback: (dsc: DynamicSamplingContext) => void): void;
/**

@@ -225,3 +212,3 @@ * Register a callback when an OpenTelemetry span is ended (in @sentry/opentelemetry-node).

*/
on?(hook: 'otelSpanEnd', callback: (otelSpan: unknown, mutableOptions: {
on(hook: 'otelSpanEnd', callback: (otelSpan: unknown, mutableOptions: {
drop: boolean;

@@ -234,18 +221,26 @@ }) => void): void;

*/
on?(hook: 'beforeSendFeedback', callback: (feedback: FeedbackEvent, options?: {
on(hook: 'beforeSendFeedback', callback: (feedback: FeedbackEvent, options?: {
includeReplay?: boolean;
}) => void): void;
/**
* A hook for BrowserTracing to trigger a span start for a page load.
* A hook for the browser tracing integrations to trigger a span start for a page load.
*/
on?(hook: 'startPageLoadSpan', callback: (options: StartSpanOptions) => void): void;
on(hook: 'startPageLoadSpan', callback: (options: StartSpanOptions) => void): void;
/**
* A hook for BrowserTracing to trigger a span for a navigation.
* A hook for browser tracing integrations to trigger a span for a navigation.
*/
on?(hook: 'startNavigationSpan', callback: (options: StartSpanOptions) => void): void;
on(hook: 'startNavigationSpan', callback: (options: StartSpanOptions) => void): void;
/**
* A hook that is called when the client is flushing
*/
on(hook: 'flush', callback: () => void): void;
/**
* A hook that is called when the client is closing
*/
on(hook: 'close', callback: () => void): void;
/**
* Fire a hook event for transaction start.
* Expects to be given a transaction as the second argument.
*/
emit?(hook: 'startTransaction', transaction: Transaction): void;
emit(hook: 'startTransaction', transaction: Transaction): void;
/**

@@ -255,4 +250,4 @@ * Fire a hook event for transaction finish.

*/
emit?(hook: 'finishTransaction', transaction: Transaction): void;
emit?(hook: 'beforeEnvelope', envelope: Envelope): void;
emit(hook: 'finishTransaction', transaction: Transaction): void;
emit(hook: 'beforeEnvelope', envelope: Envelope): void;
/**

@@ -263,3 +258,3 @@ * Fire a hook event before sending an event.

*/
emit?(hook: 'beforeSendEvent', event: Event, hint?: EventHint): void;
emit(hook: 'beforeSendEvent', event: Event, hint?: EventHint): void;
/**

@@ -269,12 +264,12 @@ * Fire a hook event to process events before they are passed to (global) event processors.

*/
emit?(hook: 'preprocessEvent', event: Event, hint?: EventHint): void;
emit?(hook: 'afterSendEvent', event: Event, sendResponse: TransportMakeRequestResponse | void): void;
emit(hook: 'preprocessEvent', event: Event, hint?: EventHint): void;
emit(hook: 'afterSendEvent', event: Event, sendResponse: TransportMakeRequestResponse | void): void;
/**
* Fire a hook for when a breadcrumb is added. Expects the breadcrumb as second argument.
*/
emit?(hook: 'beforeAddBreadcrumb', breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void;
emit(hook: 'beforeAddBreadcrumb', breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void;
/**
* Fire a hook for when a DSC (Dynamic Sampling Context) is created. Expects the DSC as second argument.
*/
emit?(hook: 'createDsc', dsc: DynamicSamplingContext): void;
emit(hook: 'createDsc', dsc: DynamicSamplingContext): void;
/**

@@ -285,3 +280,3 @@ * Fire a hook for when an OpenTelemetry span is ended (in @sentry/opentelemetry-node).

*/
emit?(hook: 'otelSpanEnd', otelSpan: unknown, mutableOptions: {
emit(hook: 'otelSpanEnd', otelSpan: unknown, mutableOptions: {
drop: boolean;

@@ -294,14 +289,22 @@ }): void;

*/
emit?(hook: 'beforeSendFeedback', feedback: FeedbackEvent, options?: {
emit(hook: 'beforeSendFeedback', feedback: FeedbackEvent, options?: {
includeReplay?: boolean;
}): void;
/**
* Emit a hook event for BrowserTracing to trigger a span start for a page load.
* Emit a hook event for browser tracing integrations to trigger a span start for a page load.
*/
emit?(hook: 'startPageLoadSpan', options: StartSpanOptions): void;
emit(hook: 'startPageLoadSpan', options: StartSpanOptions): void;
/**
* Emit a hook event for BrowserTracing to trigger a span for a navigation.
* Emit a hook event for browser tracing integrations to trigger a span for a navigation.
*/
emit?(hook: 'startNavigationSpan', options: StartSpanOptions): void;
emit(hook: 'startNavigationSpan', options: StartSpanOptions): void;
/**
* Emit a hook event for client flush
*/
emit(hook: 'flush'): void;
/**
* Emit a hook event for client close
*/
emit(hook: 'close'): void;
}
//# sourceMappingURL=client.d.ts.map

@@ -1,2 +0,2 @@

export type DataCategory = 'default' | 'error' | 'transaction' | 'replay' | 'security' | 'attachment' | 'session' | 'internal' | 'profile' | 'monitor' | 'feedback' | 'unknown' | 'span';
export type DataCategory = 'default' | 'error' | 'transaction' | 'replay' | 'security' | 'attachment' | 'session' | 'internal' | 'profile' | 'monitor' | 'feedback' | 'unknown';
//# sourceMappingURL=datacategory.d.ts.map

@@ -10,3 +10,2 @@ import type { SerializedCheckIn } from './checkin';

import type { SerializedSession, Session, SessionAggregates } from './session';
import type { Span } from './span';
import type { Transaction } from './transaction';

@@ -21,10 +20,6 @@ import type { UserFeedback } from './user';

transaction?: string;
/**
* @deprecated Functonality for segment has been removed.
*/
user_segment?: string;
replay_id?: string;
sampled?: string;
};
export type EnvelopeItemType = 'client_report' | 'user_report' | 'feedback' | 'session' | 'sessions' | 'transaction' | 'attachment' | 'event' | 'profile' | 'replay_event' | 'replay_recording' | 'check_in' | 'statsd' | 'span';
export type EnvelopeItemType = 'client_report' | 'user_report' | 'feedback' | 'session' | 'sessions' | 'transaction' | 'attachment' | 'event' | 'profile' | 'replay_event' | 'replay_recording' | 'check_in' | 'statsd';
export type BaseEnvelopeHeaders = {

@@ -87,5 +82,2 @@ [key: string]: unknown;

};
type SpanItemHeaders = {
type: 'span';
};
export type EventItem = BaseEnvelopeItem<EventItemHeaders, Event>;

@@ -102,3 +94,2 @@ export type AttachmentItem = BaseEnvelopeItem<AttachmentItemHeaders, string | Uint8Array>;

export type ProfileItem = BaseEnvelopeItem<ProfileItemHeaders, Profile>;
export type SpanItem = BaseEnvelopeItem<SpanItemHeaders, Span>;
export type EventEnvelopeHeaders = {

@@ -118,3 +109,2 @@ event_id: string;

type StatsdEnvelopeHeaders = BaseEnvelopeHeaders;
type SpanEnvelopeHeaders = BaseEnvelopeHeaders;
export type EventEnvelope = BaseEnvelope<EventEnvelopeHeaders, EventItem | AttachmentItem | UserFeedbackItem | FeedbackItem | ProfileItem>;

@@ -126,6 +116,5 @@ export type SessionEnvelope = BaseEnvelope<SessionEnvelopeHeaders, SessionItem>;

export type StatsdEnvelope = BaseEnvelope<StatsdEnvelopeHeaders, StatsdItem>;
export type SpanEnvelope = BaseEnvelope<SpanEnvelopeHeaders, SpanItem>;
export type Envelope = EventEnvelope | SessionEnvelope | ClientReportEnvelope | ReplayEnvelope | CheckInEnvelope | StatsdEnvelope | SpanEnvelope;
export type Envelope = EventEnvelope | SessionEnvelope | ClientReportEnvelope | ReplayEnvelope | CheckInEnvelope | StatsdEnvelope;
export type EnvelopeItem = Envelope[1][number];
export {};
//# sourceMappingURL=envelope.d.ts.map

@@ -13,3 +13,3 @@ import type { Attachment } from './attachment';

import type { SdkInfo } from './sdkinfo';
import type { Severity, SeverityLevel } from './severity';
import type { SeverityLevel } from './severity';
import type { MetricSummary, Span, SpanJSON } from './span';

@@ -29,3 +29,3 @@ import type { Thread } from './thread';

start_timestamp?: number;
level?: Severity | SeverityLevel;
level?: SeverityLevel;
platform?: string;

@@ -32,0 +32,0 @@ logger?: string;

@@ -9,3 +9,3 @@ import type { Breadcrumb, BreadcrumbHint } from './breadcrumb';

import type { Session } from './session';
import type { Severity, SeverityLevel } from './severity';
import type { SeverityLevel } from './severity';
import type { CustomSamplingContext, Transaction, TransactionContext } from './transaction';

@@ -77,3 +77,3 @@ import type { User } from './user';

*/
getClient(): Client | undefined;
getClient<C extends Client>(): C | undefined;
/**

@@ -111,3 +111,3 @@ * Returns the scope of the top stack.

*/
captureMessage(message: string, level?: Severity | SeverityLevel, hint?: EventHint): string;
captureMessage(message: string, level?: SeverityLevel, hint?: EventHint): string;
/**

@@ -123,10 +123,2 @@ * Captures a manually created event and sends it to Sentry.

/**
* This is the getter for lastEventId.
*
* @returns The last event id of a captured event.
*
* @deprecated This will be removed in v8.
*/
lastEventId(): string | undefined;
/**
* Records a new breadcrumb which will be attached to future events.

@@ -198,17 +190,2 @@ *

/**
* Callback to set context information onto the scope.
*
* @param callback Callback function that receives Scope.
* @deprecated Use `getScope()` directly.
*/
configureScope(callback: (scope: Scope) => void): void;
/**
* For the duration of the callback, this hub will be set as the global current Hub.
* This function is useful if you want to run your own client and hook into an already initialized one
* e.g.: Reporting issues to your own sentry when running in your component while still using the users configuration.
*
* TODO v8: This will be merged with `withScope()`
*/
run(callback: (hub: Hub) => void): void;
/**
* Returns the integration if installed on the current client.

@@ -220,10 +197,2 @@ *

/**
* Returns all trace headers that are currently on the top scope.
*
* @deprecated Use `spanToTraceHeader()` instead.
*/
traceHeaders(): {
[key: string]: string;
};
/**
* Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.

@@ -230,0 +199,0 @@ *

@@ -9,3 +9,3 @@ export type { Attachment } from './attachment';

export type { DebugImage, DebugMeta } from './debugMeta';
export type { AttachmentItem, BaseEnvelopeHeaders, BaseEnvelopeItemHeaders, ClientReportEnvelope, ClientReportItem, DynamicSamplingContext, Envelope, EnvelopeItemType, EnvelopeItem, EventEnvelope, EventEnvelopeHeaders, EventItem, ReplayEnvelope, FeedbackItem, SessionEnvelope, SessionItem, UserFeedbackItem, CheckInItem, CheckInEnvelope, StatsdItem, StatsdEnvelope, ProfileItem, SpanEnvelope, SpanItem, } from './envelope';
export type { AttachmentItem, BaseEnvelopeHeaders, BaseEnvelopeItemHeaders, ClientReportEnvelope, ClientReportItem, DynamicSamplingContext, Envelope, EnvelopeItemType, EnvelopeItem, EventEnvelope, EventEnvelopeHeaders, EventItem, ReplayEnvelope, FeedbackItem, SessionEnvelope, SessionItem, UserFeedbackItem, CheckInItem, CheckInEnvelope, StatsdItem, StatsdEnvelope, ProfileItem, } from './envelope';
export type { ExtendedError } from './error';

@@ -32,7 +32,6 @@ export type { Event, EventHint, EventType, ErrorEvent, TransactionEvent, SerializedEvent } from './event';

export type { SessionAggregates, AggregationCounts, Session, SessionContext, SessionStatus, RequestSession, RequestSessionStatus, SessionFlusherLike, SerializedSession, } from './session';
export type { Severity, SeverityLevel } from './severity';
export type { SeverityLevel } from './severity';
export type { Span, SpanContext, SpanOrigin, SpanAttributeValue, SpanAttributes, SpanTimeInput, SpanJSON, SpanContextData, TraceFlag, MetricSummary, } from './span';
export type { StackFrame } from './stackframe';
export type { Stacktrace, StackParser, StackLineParser, StackLineParserFn } from './stacktrace';
export type { TextEncoderInternal } from './textencoder';
export type { PropagationContext, TracePropagationTargets } from './tracing';

@@ -47,3 +46,2 @@ export type { StartSpanOptions } from './startSpanOptions';

export type { WrappedFunction } from './wrappedfunction';
export type { Instrumenter } from './instrumenter';
export type { HandlerDataFetch, HandlerDataXhr, HandlerDataDom, HandlerDataConsole, HandlerDataHistory, HandlerDataError, HandlerDataUnhandledRejection, ConsoleLevel, SentryXhrData, SentryWrappedXMLHttpRequest, } from './instrument';

@@ -50,0 +48,0 @@ export type { BrowserClientReplayOptions, BrowserClientProfilingOptions } from './browseroptions';

@@ -23,6 +23,4 @@ import type { Client } from './client';

* It does not receives any arguments, and should only use for e.g. global monkey patching and similar things.
*
* NOTE: In v8, this will become optional.
*/
setupOnce(): void;
setupOnce?(): void;
/**

@@ -67,6 +65,4 @@ * Set up an integration for the given client.

* It does not receives any arguments, and should only use for e.g. global monkey patching and similar things.
*
* NOTE: In v8, this will become optional, and not receive any arguments anymore.
*/
setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void;
setupOnce?(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void;
/**

@@ -73,0 +69,0 @@ * Set up an integration for the given client.

import type { Breadcrumb, BreadcrumbHint } from './breadcrumb';
import type { ErrorEvent, Event, EventHint, TransactionEvent } from './event';
import type { Instrumenter } from './instrumenter';
import type { Integration } from './integration';

@@ -53,10 +52,2 @@ import type { CaptureContext } from './scope';

/**
* The instrumenter to use. Defaults to `sentry`.
* When not set to `sentry`, auto-instrumentation inside of Sentry will be disabled,
* in favor of using external auto instrumentation.
*
* NOTE: Any option except for `sentry` is highly experimental and subject to change!
*/
instrumenter?: Instrumenter;
/**
* A function that takes transport options and returns the Transport object which is used to send events to Sentry.

@@ -195,18 +186,27 @@ * The function is invoked internally when the client is initialized.

/**
* List of strings/regex controlling to which outgoing requests
* the SDK will attach tracing headers.
* List of strings and/or Regular Expressions used to determine which outgoing requests will have `sentry-trace` and `baggage`
* headers attached.
*
* By default the SDK will attach those headers to all requests to localhost
* and same origin. If this option is provided, the SDK will match the
* request URL of outgoing requests against the items in this
* array, and only attach tracing headers if a match was found.
* **Default:** If this option is not provided, tracing headers will be attached to all outgoing requests.
* If you are using a browser SDK, by default, tracing headers will only be attached to outgoing requests to the same origin.
*
* @example
* ```js
* Sentry.init({
* tracePropagationTargets: ['api.site.com'],
* });
* ```
* **Disclaimer:** Carelessly setting this option in browser environments may result into CORS errors!
* Only attach tracing headers to requests to the same origin, or to requests to services you can control CORS headers of.
* Cross-origin requests, meaning requests to a different domain, for example a request to `https://api.example.com/` while you're on `https://example.com/`, take special care.
* If you are attaching headers to cross-origin requests, make sure the backend handling the request returns a `"Access-Control-Allow-Headers: sentry-trace, baggage"` header to ensure your requests aren't blocked.
*
* Default: ['localhost', /^\//] {@see DEFAULT_TRACE_PROPAGATION_TARGETS}
* If you provide a `tracePropagationTargets` array, the entries you provide will be matched against the entire URL of the outgoing request.
* If you are using a browser SDK, the entries will also be matched against the pathname of the outgoing requests.
* This is so you can have matchers for relative requests, for example, `/^\/api/` if you want to trace requests to your `/api` routes on the same domain.
*
* If any of the two match any of the provided values, tracing headers will be attached to the outgoing request.
* Both, the string values, and the RegExes you provide in the array will match if they partially match the URL or pathname.
*
* Examples:
* - `tracePropagationTargets: [/^\/api/]` and request to `https://same-origin.com/api/posts`:
* - Tracing headers will be attached because the request is sent to the same origin and the regex matches the pathname "/api/posts".
* - `tracePropagationTargets: [/^\/api/]` and request to `https://different-origin.com/api/posts`:
* - Tracing headers will not be attached because the pathname will only be compared when the request target lives on the same origin.
* - `tracePropagationTargets: [/^\/api/, 'https://external-api.com']` and request to `https://external-api.com/v1/data`:
* - Tracing headers will be attached because the request URL matches the string `'https://external-api.com'`.
*/

@@ -213,0 +213,0 @@ tracePropagationTargets?: TracePropagationTargets;

@@ -10,3 +10,3 @@ import type { Attachment } from './attachment';

import type { RequestSession, Session } from './session';
import type { Severity, SeverityLevel } from './severity';
import type { SeverityLevel } from './severity';
import type { Span } from './span';

@@ -21,3 +21,3 @@ import type { PropagationContext } from './tracing';

user: User;
level: Severity | SeverityLevel;
level: SeverityLevel;
extra: Extras;

@@ -53,3 +53,3 @@ contexts: Contexts;

/**
* Holds additional event information. {@link Scope.applyToEvent} will be called by the client before an event is sent.
* Holds additional event information.
*/

@@ -66,4 +66,4 @@ export interface Scope {

*/
getClient(): Client | undefined;
/** Add new event processor that will be called after {@link applyToEvent}. */
getClient<C extends Client>(): C | undefined;
/** Add new event processor that will be called during event processing. */
addEventProcessor(callback: EventProcessor): this;

@@ -118,3 +118,3 @@ /** Get the data of this scope, which is applied to an event during processing. */

*/
setLevel(level: Severity | SeverityLevel): this;
setLevel(level: SeverityLevel): this;
/**

@@ -239,3 +239,7 @@ * Sets the transaction name on the scope for future events.

captureEvent(event: Event, hint?: EventHint): string;
/**
* Clone all data from this scope into a new scope.
*/
clone(): Scope;
}
//# sourceMappingURL=scope.d.ts.map

@@ -1,20 +0,2 @@

/**
* @deprecated Please use a `SeverityLevel` string instead of the `Severity` enum. Acceptable values are 'fatal',
* 'error', 'warning', 'log', 'info', and 'debug'.
*/
export declare enum Severity {
/** JSDoc */
Fatal = "fatal",
/** JSDoc */
Error = "error",
/** JSDoc */
Warning = "warning",
/** JSDoc */
Log = "log",
/** JSDoc */
Info = "info",
/** JSDoc */
Debug = "debug"
}
export type SeverityLevel = 'fatal' | 'error' | 'warning' | 'log' | 'info' | 'debug';
//# sourceMappingURL=severity.d.ts.map

@@ -1,7 +0,4 @@

import type { TraceContext } from './context';
import type { Instrumenter } from './instrumenter';
import type { Measurements } from './measurement';
import type { Primitive } from './misc';
import type { HrTime } from './opentelemetry';
import type { Transaction } from './transaction';
import type { TransactionSource } from './transaction';
type SpanOriginType = 'manual' | 'auto';

@@ -16,3 +13,3 @@ type SpanOriginCategory = string;

'sentry.op': string;
'sentry.source': string;
'sentry.source': TransactionSource;
'sentry.sample_rate': number;

@@ -48,4 +45,4 @@ }> & Record<string, SpanAttributeValue | undefined>;

}
type TraceFlagNone = 0x0;
type TraceFlagSampled = 0x1;
type TraceFlagNone = 0;
type TraceFlagSampled = 1;
export type TraceFlag = TraceFlagNone | TraceFlagSampled;

@@ -77,16 +74,14 @@ export interface SpanContextData {

* data out-of-band leaves this flag unset.
* We allow number here because otel also does, so we can't be stricter than them.
*/
traceFlags: TraceFlag;
traceFlags: TraceFlag | number;
}
/** Interface holding all properties that can be set on a Span on creation. */
/**
* Interface holding all properties that can be set on a Span on creation.
* This is only used for the legacy span/transaction creation and will go away in v8.
*/
export interface SpanContext {
/**
* Description of the Span.
*
* @deprecated Use `name` instead.
* Human-readable identifier for the span.
*/
description?: string | undefined;
/**
* Human-readable identifier for the span. Alias for span.description.
*/
name?: string | undefined;

@@ -98,7 +93,2 @@ /**

/**
* Completion status of the Span.
* See: {@sentry/tracing SpanStatus} for possible values
*/
status?: string | undefined;
/**
* Parent Span ID

@@ -146,108 +136,11 @@ */

/**
* The instrumenter that created this span.
*/
instrumenter?: Instrumenter | undefined;
/**
* The origin of the span, giving context about what created the span.
*/
origin?: SpanOrigin | undefined;
/**
* Exclusive time in milliseconds.
*/
exclusiveTime?: number;
/**
* Measurements of the Span.
*/
measurements?: Measurements;
}
/** Span holding trace_id, span_id */
export interface Span extends Omit<SpanContext, 'op' | 'status' | 'origin'> {
/**
* A generic Span which holds trace data.
*/
export interface Span {
/**
* Human-readable identifier for the span. Identical to span.description.
* @deprecated Use `spanToJSON(span).description` instead.
*/
name: string;
/**
* Operation of the Span.
*
* @deprecated Use `startSpan()` functions to set, `span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_OP, 'op')
* to update and `spanToJSON().op` to read the op instead
*/
op?: string | undefined;
/**
* The ID of the span.
* @deprecated Use `spanContext().spanId` instead.
*/
spanId: string;
/**
* Parent Span ID
*
* @deprecated Use `spanToJSON(span).parent_span_id` instead.
*/
parentSpanId?: string | undefined;
/**
* The ID of the trace.
* @deprecated Use `spanContext().traceId` instead.
*/
traceId: string;
/**
* Was this span chosen to be sent as part of the sample?
* @deprecated Use `isRecording()` instead.
*/
sampled?: boolean | undefined;
/**
* Timestamp in seconds (epoch time) indicating when the span started.
* @deprecated Use `spanToJSON()` instead.
*/
startTimestamp: number;
/**
* Timestamp in seconds (epoch time) indicating when the span ended.
* @deprecated Use `spanToJSON()` instead.
*/
endTimestamp?: number | undefined;
/**
* Tags for the span.
* @deprecated Use `spanToJSON(span).atttributes` instead.
*/
tags: {
[key: string]: Primitive;
};
/**
* Data for the span.
* @deprecated Use `spanToJSON(span).atttributes` instead.
*/
data: {
[key: string]: any;
};
/**
* Attributes for the span.
* @deprecated Use `spanToJSON(span).atttributes` instead.
*/
attributes: SpanAttributes;
/**
* The transaction containing this span
* @deprecated Use top level `Sentry.getRootSpan()` instead
*/
transaction?: Transaction;
/**
* The instrumenter that created this span.
*
* @deprecated this field will be removed.
*/
instrumenter: Instrumenter;
/**
* Completion status of the Span.
*
* See: {@sentry/tracing SpanStatus} for possible values
*
* @deprecated Use `.setStatus` to set or update and `spanToJSON()` to read the status.
*/
status?: string | undefined;
/**
* The origin of the span, giving context about what created the span.
*
* @deprecated Use `startSpan` function to set and `spanToJSON(span).origin` to read the origin instead.
*/
origin?: SpanOrigin | undefined;
/**
* Get context data for this span.

@@ -258,10 +151,2 @@ * This includes the spanId & the traceId.

/**
* Sets the finish timestamp on the current span.
*
* @param endTimestamp Takes an endTimestamp if the end should not be the time when you call this function.
*
* @deprecated Use `.end()` instead.
*/
finish(endTimestamp?: number): void;
/**
* End the current span.

@@ -271,19 +156,2 @@ */

/**
* Sets the tag attribute on the current span.
*
* Can also be used to unset a tag, by passing `undefined`.
*
* @param key Tag key
* @param value Tag value
* @deprecated Use `setAttribute()` instead.
*/
setTag(key: string, value: Primitive): this;
/**
* Sets the data attribute on the current span
* @param key Data key
* @param value Data value
* @deprecated Use `setAttribute()` instead.
*/
setData(key: string, value: any): this;
/**
* Set a single attribute on the span.

@@ -300,3 +168,3 @@ * Set it to `undefined` to remove the attribute.

* Sets the status attribute on the current span
* See: {@sentry/tracing SpanStatus} for possible values
* See: {@sentry/core SpanStatusType} for possible values
* @param status http code used to set the status

@@ -306,14 +174,2 @@ */

/**
* Sets the status attribute on the current span based on the http code
* @param httpStatus http code used to set the status
* @deprecated Use top-level `setHttpStatus()` instead.
*/
setHttpStatus(httpStatus: number): this;
/**
* Set the name of the span.
*
* @deprecated Use `updateName()` instead.
*/
setName(name: string): void;
/**
* Update the name of the span.

@@ -323,40 +179,2 @@ */

/**
* Creates a new `Span` while setting the current `Span.id` as `parentSpanId`.
* Also the `sampled` decision will be inherited.
*
* @deprecated Use `startSpan()`, `startSpanManual()` or `startInactiveSpan()` instead.
*/
startChild(spanContext?: Pick<SpanContext, Exclude<keyof SpanContext, 'sampled' | 'traceId' | 'parentSpanId'>>): Span;
/**
* Determines whether span was successful (HTTP200)
*
* @deprecated Use `spanToJSON(span).status === 'ok'` instead.
*/
isSuccess(): boolean;
/**
* Return a traceparent compatible header string.
* @deprecated Use `spanToTraceHeader()` instead.
*/
toTraceparent(): string;
/**
* Returns the current span properties as a `SpanContext`.
* @deprecated Use `toJSON()` or access the fields directly instead.
*/
toContext(): SpanContext;
/**
* Updates the current span with a new `SpanContext`.
* @deprecated Update the fields directly instead.
*/
updateWithContext(spanContext: SpanContext): this;
/**
* Convert the object to JSON for w. spans array info only.
* @deprecated Use `spanToTraceContext()` util function instead.
*/
getTraceContext(): TraceContext;
/**
* Convert the object to JSON.
* @deprecated Use `spanToJSON(span)` instead.
*/
toJSON(): SpanJSON;
/**
* If this is span is actually recording data.

@@ -363,0 +181,0 @@ * This will return false if tracing is disabled, this span was not sampled or if the span is already finished.

@@ -1,2 +0,1 @@

import type { Instrumenter } from './instrumenter';
import type { Primitive } from './misc';

@@ -44,7 +43,2 @@ import type { Scope } from './scope';

/**
* The name thingy.
* @deprecated Use `name` instead.
*/
description?: string;
/**
* @deprecated Use `span.setStatus()` instead.

@@ -93,7 +87,3 @@ */

endTimestamp?: number;
/**
* @deprecated You cannot set the instrumenter manually anymore.
*/
instrumenter?: Instrumenter;
}
//# sourceMappingURL=startSpanOptions.d.ts.map
import type { Context } from './context';
import type { DynamicSamplingContext } from './envelope';
import type { Instrumenter } from './instrumenter';
import type { MeasurementUnit } from './measurement';

@@ -36,13 +35,21 @@ import type { ExtractedNodeRequestData, Primitive, WorkerLocation } from './misc';

*/
export type TraceparentData = Pick<TransactionContext, 'traceId' | 'parentSpanId' | 'parentSampled'>;
export interface TraceparentData {
/**
* Trace ID
*/
traceId?: string | undefined;
/**
* Parent Span ID
*/
parentSpanId?: string | undefined;
/**
* If this transaction has a parent, the parent's sampling decision
*/
parentSampled?: boolean | undefined;
}
/**
* Transaction "Class", inherits Span only has `setName`
*/
export interface Transaction extends TransactionContext, Omit<Span, 'setName' | 'name'> {
export interface Transaction extends Omit<TransactionContext, 'name' | 'op'>, Span {
/**
* Human-readable identifier for the transaction.
* @deprecated Use `spanToJSON(span).description` instead.
*/
name: string;
/**
* The ID of the transaction.

@@ -91,14 +98,2 @@ * @deprecated Use `spanContext().spanId` instead.

/**
* The instrumenter that created this transaction.
*
* @deprecated This field will be removed in v8.
*/
instrumenter: Instrumenter;
/**
* Set the name of the transaction
*
* @deprecated Use `.updateName()` and `.setAttribute()` instead.
*/
setName(name: string, source?: TransactionMetadata['source']): void;
/**
* Set the context of a transaction event.

@@ -124,7 +119,2 @@ * @deprecated Use either `.setAttribute()`, or set the context on the scope before creating the transaction.

/**
* Updates the current transaction with a new `TransactionContext`.
* @deprecated Update the fields directly instead.
*/
updateWithContext(transactionContext: TransactionContext): this;
/**
* Set metadata for this transaction.

@@ -141,6 +131,8 @@ * @deprecated Use attributes or store data on the scope instead.

/**
* Get the profile id from the transaction
* @deprecated Use `toJSON()` or access the fields directly instead.
* Creates a new `Span` while setting the current `Span.id` as `parentSpanId`.
* Also the `sampled` decision will be inherited.
*
* @deprecated Use `startSpan()`, `startSpanManual()` or `startInactiveSpan()` instead.
*/
getProfileId(): string | undefined;
startChild(spanContext?: Pick<SpanContext, Exclude<keyof SpanContext, 'sampled' | 'traceId' | 'parentSpanId'>>): Span;
}

@@ -190,9 +182,2 @@ /**

request?: PolymorphicRequest;
/** Compatibility shim for transitioning to the `RequestData` integration. The options passed to our Express request
* handler controlling what request data is added to the event.
* TODO (v8): This should go away
*/
requestDataOptionsFromExpressHandler?: {
[key: string]: unknown;
};
/** For transactions tracing server-side request handling, the path of the request being tracked. */

@@ -202,7 +187,2 @@ /** TODO: If we rm -rf `instrumentServer`, this can go, too */

/**
* Information on how a transaction name was generated.
* @deprecated Use `SEMANTIC_ATTRIBUTE_SENTRY_SOURCE` attribute instead.
*/
source: TransactionSource;
/**
* Metadata for the transaction's spans, keyed by spanId.

@@ -209,0 +189,0 @@ * @deprecated This will be removed in v8.

import type { Client } from './client';
import type { Envelope } from './envelope';
import type { TextEncoderInternal } from './textencoder';
export type TransportRequest = {

@@ -18,3 +17,2 @@ body: string | Uint8Array;

recordDroppedEvent: Client['recordDroppedEvent'];
textEncoder?: TextEncoderInternal;
}

@@ -21,0 +19,0 @@ export interface BaseTransportOptions extends InternalBaseTransportOptions {

@@ -10,6 +10,2 @@ /**

username?: string;
/**
* @deprecated Functonality for segment has been removed. Use a custom tag or context instead to capture this information.
*/
segment?: string;
}

@@ -16,0 +12,0 @@ export interface UserFeedback {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc