Socket
Socket
Sign inDemoInstall

@sentry/core

Package Overview
Dependencies
2
Maintainers
11
Versions
467
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 8.0.0-alpha.5 to 8.0.0-alpha.6

types-ts3.8/utils/spanOnScope.d.ts

6

package.json
{
"name": "@sentry/core",
"version": "8.0.0-alpha.5",
"version": "8.0.0-alpha.6",
"description": "Base implementation for all Sentry JavaScript SDKs",

@@ -45,4 +45,4 @@ "repository": "git://github.com/getsentry/sentry-javascript.git",

"dependencies": {
"@sentry/types": "8.0.0-alpha.5",
"@sentry/utils": "8.0.0-alpha.5"
"@sentry/types": "8.0.0-alpha.6",
"@sentry/utils": "8.0.0-alpha.6"
},

@@ -49,0 +49,0 @@ "madge": {

import { Event, EventHint, EventProcessor } from '@sentry/types';
/**
* Returns the global event processors.
* @deprecated Global event processors will be removed in v8.
*/
export declare function getGlobalEventProcessors(): EventProcessor[];
/**
* Add a EventProcessor to be kept globally.
* @deprecated Use `addEventProcessor` instead. Global event processors will be removed in v8.
*/
export declare function addGlobalEventProcessor(callback: EventProcessor): void;
/**
* Process an array of event processors, returning the processed event (or `null` if the event was dropped).

@@ -14,0 +4,0 @@ */

@@ -24,4 +24,4 @@ import { Client, HandlerDataFetch, Scope, Span, SpanOrigin } from '@sentry/types';

} | PolymorphicRequestHeaders;
}, requestSpan?: Span): PolymorphicRequestHeaders | undefined;
}, span?: Span): PolymorphicRequestHeaders | undefined;
export {};
//# sourceMappingURL=fetch.d.ts.map

@@ -231,10 +231,2 @@ import { Breadcrumb, BreadcrumbHint, Client, Event, EventHint, Extra, Extras, Hub as HubInterface, Integration, IntegrationClass, Primitive, Scope as ScopeInterface, Session, SessionContext, SeverityLevel, User } from '@sentry/types';

/**
* Replaces the current main hub with the passed one on the global object
*
* @returns The old replaced hub
*
* @deprecated Use `setCurrentClient()` instead.
*/
export declare function makeMain(hub: HubInterface): HubInterface;
/**
* Returns the default hub instance.

@@ -241,0 +233,0 @@ *

@@ -12,3 +12,3 @@ export { ClientClass } from './sdk';

export { captureCheckIn, withMonitor, captureException, captureEvent, captureMessage, close, flush, setContext, setExtra, setExtras, setTag, setTags, setUser, isInitialized, startSession, endSession, captureSession, addEventProcessor, } from './exports';
export { getCurrentHub, Hub, makeMain, getGlobalHub, getDefaultCurrentScope, getDefaultIsolationScope, } from './hub';
export { getCurrentHub, Hub, getGlobalHub, getDefaultCurrentScope, getDefaultIsolationScope, } from './hub';
export { getCurrentScope, getIsolationScope, getGlobalScope, withScope, withIsolationScope, getClient, } from './currentScopes';

@@ -19,3 +19,3 @@ export { getMainCarrier, setAsyncContextStrategy, } from './asyncContext';

export { Scope } from './scope';
export { notifyEventProcessors, addGlobalEventProcessor, } from './eventProcessors';
export { notifyEventProcessors } from './eventProcessors';
export { getEnvelopeEndpointWithUrlEncodedAuth, getReportDialogEndpoint } from './api';

@@ -22,0 +22,0 @@ export { BaseClient } from './baseclient';

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

import { Client, Integration, IntegrationClass, IntegrationFn, IntegrationFnResult, Options } from '@sentry/types';
import { Client, Integration, IntegrationClass, IntegrationFn, Options } from '@sentry/types';
declare module '@sentry/types' {

@@ -40,3 +40,3 @@ interface Integration {

*/
export declare function defineIntegration<Fn extends IntegrationFn>(fn: Fn): (...args: Parameters<Fn>) => IntegrationFnResult;
export declare function defineIntegration<Fn extends IntegrationFn>(fn: Fn): (...args: Parameters<Fn>) => Integration;
//# sourceMappingURL=integration.d.ts.map

@@ -7,4 +7,4 @@ interface CaptureConsoleOptions {

*/
export declare const captureConsoleIntegration: (options?: CaptureConsoleOptions | undefined) => import("@sentry/types").IntegrationFnResult;
export declare const captureConsoleIntegration: (options?: CaptureConsoleOptions | undefined) => import("@sentry/types").Integration;
export {};
//# sourceMappingURL=captureconsole.d.ts.map

@@ -7,4 +7,4 @@ interface DebugOptions {

}
export declare const debugIntegration: (options?: DebugOptions | undefined) => import("@sentry/types").IntegrationFnResult;
export declare const debugIntegration: (options?: DebugOptions | undefined) => import("@sentry/types").Integration;
export {};
//# sourceMappingURL=debug.d.ts.map

@@ -5,5 +5,5 @@ import { Event } from '@sentry/types';

*/
export declare const dedupeIntegration: () => import("@sentry/types").IntegrationFnResult;
export declare const dedupeIntegration: () => import("@sentry/types").Integration;
/** only exported for tests. */
export declare function _shouldDropEvent(currentEvent: Event, previousEvent?: Event): boolean;
//# sourceMappingURL=dedupe.d.ts.map

@@ -13,4 +13,4 @@ interface ExtraErrorDataOptions {

}
export declare const extraErrorDataIntegration: (options?: Partial<ExtraErrorDataOptions> | undefined) => import("@sentry/types").IntegrationFnResult;
export declare const extraErrorDataIntegration: (options?: Partial<ExtraErrorDataOptions> | undefined) => import("@sentry/types").Integration;
export {};
//# sourceMappingURL=extraerrordata.d.ts.map

@@ -12,3 +12,3 @@ /**

*/
export declare const functionToStringIntegration: () => import("@sentry/types").IntegrationFnResult;
export declare const functionToStringIntegration: () => import("@sentry/types").Integration;
//# sourceMappingURL=functiontostring.d.ts.map

@@ -10,3 +10,3 @@ /** Options for the InboundFilters integration */

}
export declare const inboundFiltersIntegration: (options?: Partial<InboundFiltersOptions> | undefined) => import("@sentry/types").IntegrationFnResult;
export declare const inboundFiltersIntegration: (options?: Partial<InboundFiltersOptions> | undefined) => import("@sentry/types").Integration;
//# sourceMappingURL=inboundfilters.d.ts.map

@@ -5,4 +5,4 @@ interface LinkedErrorsOptions {

}
export declare const linkedErrorsIntegration: (options?: LinkedErrorsOptions | undefined) => import("@sentry/types").IntegrationFnResult;
export declare const linkedErrorsIntegration: (options?: LinkedErrorsOptions | undefined) => import("@sentry/types").Integration;
export {};
//# sourceMappingURL=linkederrors.d.ts.map

@@ -10,3 +10,3 @@ /**

*/
export declare const moduleMetadataIntegration: () => import("@sentry/types").IntegrationFnResult;
export declare const moduleMetadataIntegration: () => import("@sentry/types").Integration;
//# sourceMappingURL=metadata.d.ts.map

@@ -26,3 +26,3 @@ import { TransactionNamingScheme } from '@sentry/utils';

*/
export declare const requestDataIntegration: (options?: RequestDataIntegrationOptions | undefined) => import("@sentry/types").IntegrationFnResult;
export declare const requestDataIntegration: (options?: RequestDataIntegrationOptions | undefined) => import("@sentry/types").Integration;
//# sourceMappingURL=requestdata.d.ts.map

@@ -11,4 +11,4 @@ import { StackFrame } from '@sentry/types';

*/
export declare const rewriteFramesIntegration: (options?: RewriteFramesOptions | undefined) => import("@sentry/types").IntegrationFnResult;
export declare const rewriteFramesIntegration: (options?: RewriteFramesOptions | undefined) => import("@sentry/types").Integration;
export {};
//# sourceMappingURL=rewriteframes.d.ts.map

@@ -5,3 +5,3 @@ /**

*/
export declare const sessionTimingIntegration: () => import("@sentry/types").IntegrationFnResult;
export declare const sessionTimingIntegration: () => import("@sentry/types").Integration;
//# sourceMappingURL=sessiontiming.d.ts.map

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

import { Attachment, Breadcrumb, CaptureContext, Client, Context, Contexts, Event, EventHint, EventProcessor, Extra, Extras, Primitive, PropagationContext, RequestSession, Scope as ScopeInterface, ScopeData, Session, SeverityLevel, Span, Transaction, User } from '@sentry/types';
import { Attachment, Breadcrumb, CaptureContext, Client, Context, Contexts, Event, EventHint, EventProcessor, Extra, Extras, Primitive, PropagationContext, RequestSession, Scope as ScopeInterface, ScopeData, Session, SeverityLevel, Transaction, User } from '@sentry/types';
/**

@@ -46,4 +46,2 @@ * Holds additional event information.

protected _transactionName?: string;
/** Span */
protected _span?: Span;
/** Session */

@@ -132,13 +130,2 @@ protected _session?: Session;

/**
* Sets the Span on the scope.
* @param span Span
* @deprecated Instead of setting a span on a scope, use `startSpan()`/`startSpanManual()` instead.
*/
setSpan(span?: Span): this;
/**
* Returns the `Span` if there is one.
* @deprecated Use `getActiveSpan()` instead.
*/
getSpan(): Span | undefined;
/**
* Returns the `Transaction` attached to the scope (if there is one).

@@ -145,0 +132,0 @@ * @deprecated You should not rely on the transaction, but just use `startSpan()` APIs instead.

@@ -6,3 +6,2 @@ export { addTracingExtensions } from './hubextensions';

export { Transaction } from './transaction';
export { getActiveTransaction } from './utils';
export { setHttpStatus, getSpanStatusFromHttpCode, } from './spanstatus';

@@ -9,0 +8,0 @@ export { SPAN_STATUS_ERROR, SPAN_STATUS_OK, SPAN_STATUS_UNSET } from './spanstatus';

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

import { Options, SamplingContext } from '@sentry/types';
import { Transaction } from './transaction';
import { Options, SamplingContext, TransactionContext } from '@sentry/types';
/**

@@ -12,3 +11,6 @@ * Makes a sampling decision for the given transaction and stores it on the transaction.

*/
export declare function sampleTransaction<T extends Transaction>(transaction: T, options: Pick<Options, 'tracesSampleRate' | 'tracesSampler' | 'enableTracing'>, samplingContext: SamplingContext): T;
export declare function sampleTransaction(transactionContext: TransactionContext, options: Pick<Options, 'tracesSampleRate' | 'tracesSampler' | 'enableTracing'>, samplingContext: SamplingContext): [
/*sampled*/ boolean,
/*sampleRate*/ number
];
//# sourceMappingURL=sampling.d.ts.map

@@ -40,40 +40,2 @@ import { Span, SpanAttributeValue, SpanAttributes, SpanContext, SpanContextData, SpanJSON, SpanStatus, SpanTimeInput, TraceContext, Transaction } from '@sentry/types';

/*
* The ID of the trace.
* @deprecated Use `spanContext().traceId` instead.
* The ID of the trace.
* @deprecated You cannot update the traceId of a span after span creation.
*/
traceId: string;
/*
* The ID of the span.
* @deprecated Use `spanContext().spanId` instead.
* The ID of the span.
* @deprecated You cannot update the spanId of a span after span creation.
*/
spanId: string;
/*
* @inheritDoc
*
* @deprecated Use `spanToJSON(span).parent_span_id` instead.
* @inheritDoc
*
* @deprecated Use `startSpan` functions instead.
*/
parentSpanId: string | undefined;
/*
* Was this span chosen to be sent as part of the sample?
* @deprecated Use `isRecording()` instead.
* Was this span chosen to be sent as part of the sample?
* @deprecated You cannot update the sampling decision of a span after span creation.
*/
sampled: boolean | undefined;
/*
* Attributes for the span.

@@ -80,0 +42,0 @@ * @deprecated Use `spanToJSON(span).atttributes` instead.

@@ -6,9 +6,8 @@ import { Scope, Span, StartSpanOptions } from '@sentry/types';

* The created span is the active span and will be used as parent by other spans created inside the function
* and can be accessed via `Sentry.getSpan()`, as long as the function is executed while the scope is active.
* and can be accessed via `Sentry.getActiveSpan()`, as long as the function is executed while the scope is active.
*
* If you want to create a span that is not set as active, use {@link startInactiveSpan}.
*
* Note that if you have not enabled tracing extensions via `addTracingExtensions`
* or you didn't set `tracesSampleRate`, this function will not generate spans
* and the `span` returned from the callback will be undefined.
* You'll always get a span passed to the callback,
* it may just be a non-recording span if the span is not sampled or if tracing is disabled.
*/

@@ -23,5 +22,4 @@ export declare function startSpan<T>(context: StartSpanOptions, callback: (span: Span) => T): T;

*
* Note that if you have not enabled tracing extensions via `addTracingExtensions`
* or you didn't set `tracesSampleRate`, this function will not generate spans
* and the `span` returned from the callback will be undefined.
* You'll always get a span passed to the callback,
* it may just be a non-recording span if the span is not sampled or if tracing is disabled.
*/

@@ -31,9 +29,8 @@ export declare function startSpanManual<T>(context: StartSpanOptions, callback: (span: Span, finish: () => void) => T): T;

* Creates a span. This span is not set as active, so will not get automatic instrumentation spans
* as children or be able to be accessed via `Sentry.getSpan()`.
* as children or be able to be accessed via `Sentry.getActiveSpan()`.
*
* If you want to create a span that is set as active, use {@link startSpan}.
*
* Note that if you have not enabled tracing extensions via `addTracingExtensions`
* or you didn't set `tracesSampleRate` or `tracesSampler`, this function will not generate spans
* and the `span` returned from the callback will be undefined.
* This function will always return a span,
* it may just be a non-recording span if the span is not sampled or if tracing is disabled.
*/

@@ -40,0 +37,0 @@ export declare function startInactiveSpan(context: StartSpanOptions): Span;

@@ -1,10 +0,3 @@

import { Span, Transaction } from '@sentry/types';
import { Span } from '@sentry/types';
import { Scope } from '@sentry/types';
import { Hub } from '../hub';
/**
* Grabs active transaction off scope.
*
* @deprecated You should not rely on the transaction, but just use `startSpan()` APIs instead.
*/
export declare function getActiveTransaction<T extends Transaction>(maybeHub?: Hub): T | undefined;
export { stripUrlQueryAndFragment } from '@sentry/utils';

@@ -11,0 +4,0 @@ /** Store the scope & isolation scope for a span, which can the be used when it is finished. */

@@ -21,4 +21,2 @@ import { CaptureContext, Client, ClientOptions, Event, EventHint, Scope as ScopeInterface, ScopeContext, StackParser } from '@sentry/types';

*
* Note: This also triggers callbacks for `addGlobalEventProcessor`, but not `beforeSend`.
*
* @param event The original event.

@@ -25,0 +23,0 @@ * @param hint May contain additional information about the original exception.

@@ -19,7 +19,2 @@ import { MeasurementUnit, Primitive, Span, SpanAttributes, SpanJSON, SpanStatus, SpanTimeInput, TraceContext } from '@sentry/types';

* Convert a span to a JSON representation.
* Note that all fields returned here are optional and need to be guarded against.
*
* Note: Because of this, we currently have a circular type dependency (which we opted out of in package.json).
* This is not avoidable as we need `spanToJSON` in `spanUtils.ts`, which in turn is needed by `span.ts` for backwards compatibility.
* And `spanToJSON` needs the Span class from `span.ts` to check here.
*/

@@ -26,0 +21,0 @@ export declare function spanToJSON(span: Span): Partial<SpanJSON>;

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

export declare const SDK_VERSION = "8.0.0-alpha.5";
export declare const SDK_VERSION = "8.0.0-alpha.6";
//# sourceMappingURL=version.d.ts.map
import type { Event, EventHint, EventProcessor } from '@sentry/types';
/**
* Returns the global event processors.
* @deprecated Global event processors will be removed in v8.
*/
export declare function getGlobalEventProcessors(): EventProcessor[];
/**
* Add a EventProcessor to be kept globally.
* @deprecated Use `addEventProcessor` instead. Global event processors will be removed in v8.
*/
export declare function addGlobalEventProcessor(callback: EventProcessor): void;
/**
* Process an array of event processors, returning the processed event (or `null` if the event was dropped).

@@ -14,0 +4,0 @@ */

@@ -21,4 +21,4 @@ import type { Client, HandlerDataFetch, Scope, Span, SpanOrigin } from '@sentry/types';

} | PolymorphicRequestHeaders;
}, requestSpan?: Span): PolymorphicRequestHeaders | undefined;
}, span?: Span): PolymorphicRequestHeaders | undefined;
export {};
//# sourceMappingURL=fetch.d.ts.map

@@ -231,10 +231,2 @@ import type { Breadcrumb, BreadcrumbHint, Client, Event, EventHint, Extra, Extras, Hub as HubInterface, Integration, IntegrationClass, Primitive, Scope as ScopeInterface, Session, SessionContext, SeverityLevel, User } from '@sentry/types';

/**
* Replaces the current main hub with the passed one on the global object
*
* @returns The old replaced hub
*
* @deprecated Use `setCurrentClient()` instead.
*/
export declare function makeMain(hub: HubInterface): HubInterface;
/**
* Returns the default hub instance.

@@ -241,0 +233,0 @@ *

@@ -12,3 +12,3 @@ export type { ClientClass } from './sdk';

export { captureCheckIn, withMonitor, captureException, captureEvent, captureMessage, close, flush, setContext, setExtra, setExtras, setTag, setTags, setUser, isInitialized, startSession, endSession, captureSession, addEventProcessor, } from './exports';
export { getCurrentHub, Hub, makeMain, getGlobalHub, getDefaultCurrentScope, getDefaultIsolationScope, } from './hub';
export { getCurrentHub, Hub, getGlobalHub, getDefaultCurrentScope, getDefaultIsolationScope, } from './hub';
export { getCurrentScope, getIsolationScope, getGlobalScope, withScope, withIsolationScope, getClient, } from './currentScopes';

@@ -19,3 +19,3 @@ export { getMainCarrier, setAsyncContextStrategy, } from './asyncContext';

export { Scope } from './scope';
export { notifyEventProcessors, addGlobalEventProcessor, } from './eventProcessors';
export { notifyEventProcessors } from './eventProcessors';
export { getEnvelopeEndpointWithUrlEncodedAuth, getReportDialogEndpoint } from './api';

@@ -22,0 +22,0 @@ export { BaseClient } from './baseclient';

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

import type { Client, Integration, IntegrationClass, IntegrationFn, IntegrationFnResult, Options } from '@sentry/types';
import type { Client, Integration, IntegrationClass, IntegrationFn, Options } from '@sentry/types';
declare module '@sentry/types' {

@@ -40,3 +40,3 @@ interface Integration {

*/
export declare function defineIntegration<Fn extends IntegrationFn>(fn: Fn): (...args: Parameters<Fn>) => IntegrationFnResult;
export declare function defineIntegration<Fn extends IntegrationFn>(fn: Fn): (...args: Parameters<Fn>) => Integration;
//# sourceMappingURL=integration.d.ts.map

@@ -7,4 +7,4 @@ interface CaptureConsoleOptions {

*/
export declare const captureConsoleIntegration: (options?: CaptureConsoleOptions | undefined) => import("@sentry/types").IntegrationFnResult;
export declare const captureConsoleIntegration: (options?: CaptureConsoleOptions | undefined) => import("@sentry/types").Integration;
export {};
//# sourceMappingURL=captureconsole.d.ts.map

@@ -7,4 +7,4 @@ interface DebugOptions {

}
export declare const debugIntegration: (options?: DebugOptions | undefined) => import("@sentry/types").IntegrationFnResult;
export declare const debugIntegration: (options?: DebugOptions | undefined) => import("@sentry/types").Integration;
export {};
//# sourceMappingURL=debug.d.ts.map

@@ -5,5 +5,5 @@ import type { Event } from '@sentry/types';

*/
export declare const dedupeIntegration: () => import("@sentry/types").IntegrationFnResult;
export declare const dedupeIntegration: () => import("@sentry/types").Integration;
/** only exported for tests. */
export declare function _shouldDropEvent(currentEvent: Event, previousEvent?: Event): boolean;
//# sourceMappingURL=dedupe.d.ts.map

@@ -13,4 +13,4 @@ interface ExtraErrorDataOptions {

}
export declare const extraErrorDataIntegration: (options?: Partial<ExtraErrorDataOptions> | undefined) => import("@sentry/types").IntegrationFnResult;
export declare const extraErrorDataIntegration: (options?: Partial<ExtraErrorDataOptions> | undefined) => import("@sentry/types").Integration;
export {};
//# sourceMappingURL=extraerrordata.d.ts.map

@@ -12,3 +12,3 @@ /**

*/
export declare const functionToStringIntegration: () => import("@sentry/types").IntegrationFnResult;
export declare const functionToStringIntegration: () => import("@sentry/types").Integration;
//# sourceMappingURL=functiontostring.d.ts.map

@@ -10,3 +10,3 @@ /** Options for the InboundFilters integration */

}
export declare const inboundFiltersIntegration: (options?: Partial<InboundFiltersOptions> | undefined) => import("@sentry/types").IntegrationFnResult;
export declare const inboundFiltersIntegration: (options?: Partial<InboundFiltersOptions> | undefined) => import("@sentry/types").Integration;
//# sourceMappingURL=inboundfilters.d.ts.map

@@ -5,4 +5,4 @@ interface LinkedErrorsOptions {

}
export declare const linkedErrorsIntegration: (options?: LinkedErrorsOptions | undefined) => import("@sentry/types").IntegrationFnResult;
export declare const linkedErrorsIntegration: (options?: LinkedErrorsOptions | undefined) => import("@sentry/types").Integration;
export {};
//# sourceMappingURL=linkederrors.d.ts.map

@@ -10,3 +10,3 @@ /**

*/
export declare const moduleMetadataIntegration: () => import("@sentry/types").IntegrationFnResult;
export declare const moduleMetadataIntegration: () => import("@sentry/types").Integration;
//# sourceMappingURL=metadata.d.ts.map

@@ -26,3 +26,3 @@ import type { TransactionNamingScheme } from '@sentry/utils';

*/
export declare const requestDataIntegration: (options?: RequestDataIntegrationOptions | undefined) => import("@sentry/types").IntegrationFnResult;
export declare const requestDataIntegration: (options?: RequestDataIntegrationOptions | undefined) => import("@sentry/types").Integration;
//# sourceMappingURL=requestdata.d.ts.map

@@ -11,4 +11,4 @@ import type { StackFrame } from '@sentry/types';

*/
export declare const rewriteFramesIntegration: (options?: RewriteFramesOptions | undefined) => import("@sentry/types").IntegrationFnResult;
export declare const rewriteFramesIntegration: (options?: RewriteFramesOptions | undefined) => import("@sentry/types").Integration;
export {};
//# sourceMappingURL=rewriteframes.d.ts.map

@@ -5,3 +5,3 @@ /**

*/
export declare const sessionTimingIntegration: () => import("@sentry/types").IntegrationFnResult;
export declare const sessionTimingIntegration: () => import("@sentry/types").Integration;
//# sourceMappingURL=sessiontiming.d.ts.map

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

import type { Attachment, Breadcrumb, CaptureContext, Client, Context, Contexts, Event, EventHint, EventProcessor, Extra, Extras, Primitive, PropagationContext, RequestSession, Scope as ScopeInterface, ScopeData, Session, SeverityLevel, Span, Transaction, User } from '@sentry/types';
import type { Attachment, Breadcrumb, CaptureContext, Client, Context, Contexts, Event, EventHint, EventProcessor, Extra, Extras, Primitive, PropagationContext, RequestSession, Scope as ScopeInterface, ScopeData, Session, SeverityLevel, Transaction, User } from '@sentry/types';
/**

@@ -46,4 +46,2 @@ * Holds additional event information.

protected _transactionName?: string;
/** Span */
protected _span?: Span;
/** Session */

@@ -132,13 +130,2 @@ protected _session?: Session;

/**
* Sets the Span on the scope.
* @param span Span
* @deprecated Instead of setting a span on a scope, use `startSpan()`/`startSpanManual()` instead.
*/
setSpan(span?: Span): this;
/**
* Returns the `Span` if there is one.
* @deprecated Use `getActiveSpan()` instead.
*/
getSpan(): Span | undefined;
/**
* Returns the `Transaction` attached to the scope (if there is one).

@@ -145,0 +132,0 @@ * @deprecated You should not rely on the transaction, but just use `startSpan()` APIs instead.

@@ -6,3 +6,2 @@ export { addTracingExtensions } from './hubextensions';

export { Transaction } from './transaction';
export { getActiveTransaction } from './utils';
export { setHttpStatus, getSpanStatusFromHttpCode, } from './spanstatus';

@@ -9,0 +8,0 @@ export { SPAN_STATUS_ERROR, SPAN_STATUS_OK, SPAN_STATUS_UNSET } from './spanstatus';

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

import type { Options, SamplingContext } from '@sentry/types';
import type { Transaction } from './transaction';
import type { Options, SamplingContext, TransactionContext } from '@sentry/types';
/**

@@ -12,3 +11,3 @@ * Makes a sampling decision for the given transaction and stores it on the transaction.

*/
export declare function sampleTransaction<T extends Transaction>(transaction: T, options: Pick<Options, 'tracesSampleRate' | 'tracesSampler' | 'enableTracing'>, samplingContext: SamplingContext): T;
export declare function sampleTransaction(transactionContext: TransactionContext, options: Pick<Options, 'tracesSampleRate' | 'tracesSampler' | 'enableTracing'>, samplingContext: SamplingContext): [sampled: boolean, sampleRate?: number];
//# sourceMappingURL=sampling.d.ts.map

@@ -40,44 +40,2 @@ import type { Span, SpanAttributeValue, SpanAttributes, SpanContext, SpanContextData, SpanJSON, SpanStatus, SpanTimeInput, TraceContext, Transaction } from '@sentry/types';

/**
* The ID of the trace.
* @deprecated Use `spanContext().traceId` instead.
*/
get traceId(): string;
/**
* The ID of the trace.
* @deprecated You cannot update the traceId of a span after span creation.
*/
set traceId(traceId: string);
/**
* The ID of the span.
* @deprecated Use `spanContext().spanId` instead.
*/
get spanId(): string;
/**
* The ID of the span.
* @deprecated You cannot update the spanId of a span after span creation.
*/
set spanId(spanId: string);
/**
* @inheritDoc
*
* @deprecated Use `startSpan` functions instead.
*/
set parentSpanId(string: string | undefined);
/**
* @inheritDoc
*
* @deprecated Use `spanToJSON(span).parent_span_id` instead.
*/
get parentSpanId(): string | undefined;
/**
* Was this span chosen to be sent as part of the sample?
* @deprecated Use `isRecording()` instead.
*/
get sampled(): boolean | undefined;
/**
* Was this span chosen to be sent as part of the sample?
* @deprecated You cannot update the sampling decision of a span after span creation.
*/
set sampled(sampled: boolean | undefined);
/**
* Attributes for the span.

@@ -84,0 +42,0 @@ * @deprecated Use `spanToJSON(span).atttributes` instead.

@@ -6,9 +6,8 @@ import type { Scope, Span, StartSpanOptions } from '@sentry/types';

* The created span is the active span and will be used as parent by other spans created inside the function
* and can be accessed via `Sentry.getSpan()`, as long as the function is executed while the scope is active.
* and can be accessed via `Sentry.getActiveSpan()`, as long as the function is executed while the scope is active.
*
* If you want to create a span that is not set as active, use {@link startInactiveSpan}.
*
* Note that if you have not enabled tracing extensions via `addTracingExtensions`
* or you didn't set `tracesSampleRate`, this function will not generate spans
* and the `span` returned from the callback will be undefined.
* You'll always get a span passed to the callback,
* it may just be a non-recording span if the span is not sampled or if tracing is disabled.
*/

@@ -23,5 +22,4 @@ export declare function startSpan<T>(context: StartSpanOptions, callback: (span: Span) => T): T;

*
* Note that if you have not enabled tracing extensions via `addTracingExtensions`
* or you didn't set `tracesSampleRate`, this function will not generate spans
* and the `span` returned from the callback will be undefined.
* You'll always get a span passed to the callback,
* it may just be a non-recording span if the span is not sampled or if tracing is disabled.
*/

@@ -31,9 +29,8 @@ export declare function startSpanManual<T>(context: StartSpanOptions, callback: (span: Span, finish: () => void) => T): T;

* Creates a span. This span is not set as active, so will not get automatic instrumentation spans
* as children or be able to be accessed via `Sentry.getSpan()`.
* as children or be able to be accessed via `Sentry.getActiveSpan()`.
*
* If you want to create a span that is set as active, use {@link startSpan}.
*
* Note that if you have not enabled tracing extensions via `addTracingExtensions`
* or you didn't set `tracesSampleRate` or `tracesSampler`, this function will not generate spans
* and the `span` returned from the callback will be undefined.
* This function will always return a span,
* it may just be a non-recording span if the span is not sampled or if tracing is disabled.
*/

@@ -40,0 +37,0 @@ export declare function startInactiveSpan(context: StartSpanOptions): Span;

@@ -1,10 +0,3 @@

import type { Span, Transaction } from '@sentry/types';
import type { Span } from '@sentry/types';
import type { Scope } from '@sentry/types';
import type { Hub } from '../hub';
/**
* Grabs active transaction off scope.
*
* @deprecated You should not rely on the transaction, but just use `startSpan()` APIs instead.
*/
export declare function getActiveTransaction<T extends Transaction>(maybeHub?: Hub): T | undefined;
export { stripUrlQueryAndFragment } from '@sentry/utils';

@@ -11,0 +4,0 @@ /** Store the scope & isolation scope for a span, which can the be used when it is finished. */

@@ -21,4 +21,2 @@ import type { CaptureContext, Client, ClientOptions, Event, EventHint, Scope as ScopeInterface, ScopeContext, StackParser } from '@sentry/types';

*
* Note: This also triggers callbacks for `addGlobalEventProcessor`, but not `beforeSend`.
*
* @param event The original event.

@@ -25,0 +23,0 @@ * @param hint May contain additional information about the original exception.

@@ -19,7 +19,2 @@ import type { MeasurementUnit, Primitive, Span, SpanAttributes, SpanJSON, SpanStatus, SpanTimeInput, TraceContext } from '@sentry/types';

* Convert a span to a JSON representation.
* Note that all fields returned here are optional and need to be guarded against.
*
* Note: Because of this, we currently have a circular type dependency (which we opted out of in package.json).
* This is not avoidable as we need `spanToJSON` in `spanUtils.ts`, which in turn is needed by `span.ts` for backwards compatibility.
* And `spanToJSON` needs the Span class from `span.ts` to check here.
*/

@@ -26,0 +21,0 @@ export declare function spanToJSON(span: Span): Partial<SpanJSON>;

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

export declare const SDK_VERSION = "8.0.0-alpha.5";
export declare const SDK_VERSION = "8.0.0-alpha.6";
//# sourceMappingURL=version.d.ts.map

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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

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