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.7 to 8.0.0-alpha.8

cjs/api.js

6

package.json
{
"name": "@sentry/core",
"version": "8.0.0-alpha.7",
"version": "8.0.0-alpha.8",
"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.7",
"@sentry/utils": "8.0.0-alpha.7"
"@sentry/types": "8.0.0-alpha.8",
"@sentry/utils": "8.0.0-alpha.8"
},

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

@@ -79,11 +79,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';

/**
* Checks if this hub's version is older than the given version.
*
* @param version A version number to compare to.
* @return True if the given version is newer; otherwise false.
*
* @deprecated This will be removed in v8.
*/
isOlderThan(version: number): boolean;
/**
* This binds the given client to the current scope.

@@ -98,14 +89,2 @@ * @param client An SDK client (client) instance.

*
* @deprecated Use `withScope` instead.
*/
pushScope(): ScopeInterface;
/**
* @inheritDoc
*
* @deprecated Use `withScope` instead.
*/
popScope(): boolean;
/**
* @inheritDoc
*
* @deprecated Use `Sentry.withScope()` instead.

@@ -220,13 +199,13 @@ */

/**
* Returns if default PII should be sent to Sentry and propagated in ourgoing requests
* when Tracing is used.
*
* @deprecated Use top-level `getClient().getOptions().sendDefaultPii` instead. This function
* only unnecessarily increased API surface but only wrapped accessing the option.
* Sends the current Session on the scope
*/
shouldSendDefaultPii(): boolean;
private _sendSessionUpdate;
/**
* Sends the current Session on the scope
* Push a scope to the stack.
*/
private _sendSessionUpdate;
private _pushScope;
/**
* Pop a scope from the stack.
*/
private _popScope;
}

@@ -233,0 +212,0 @@ /**

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

export { SDK_VERSION } from './version';
export { getIntegrationsToSetup, addIntegration, defineIntegration, convertIntegrationFnToClass, } from './integration';
export { getIntegrationsToSetup, addIntegration, defineIntegration, } from './integration';
export { applyScopeDataToEvent, mergeScopeData } from './utils/applyScopeDataToEvent';

@@ -37,2 +37,3 @@ export { prepareEvent } from './utils/prepareEvent';

export { spanToTraceHeader, spanToJSON, spanIsSampled, spanToTraceContext, getSpanDescendants, getStatusMessage, getRootSpan, getActiveSpan, addChildSpanToSpan, } from './utils/spanUtils';
export { parseSampleRate } from './utils/parseSampleRate';
export { applySdkMetadata } from './utils/sdkMetadata';

@@ -58,2 +59,3 @@ export { DEFAULT_ENVIRONMENT } from './constants';

export { addTracingHeadersToFetchRequest, instrumentFetchRequest } from './fetch';
export { trpcMiddleware } from './trpc';
//# sourceMappingURL=index.d.ts.map

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

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

@@ -30,9 +30,2 @@ interface Integration {

/**
* Convert a new integration function to the legacy class syntax.
* In v8, we can remove this and instead export the integration functions directly.
*
* @deprecated This will be removed in v8!
*/
export declare function convertIntegrationFnToClass<Fn extends IntegrationFn>(name: string, fn: Fn): IntegrationClass<Integration>;
/**
* Define an integration function that can be used to create an integration instance.

@@ -39,0 +32,0 @@ * Note that this by design hides the implementation details of the integration, as they are considered internal.

@@ -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, 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, User } from '@sentry/types';
/**

@@ -54,7 +54,2 @@ * Holds additional event information.

/**
* Inherit values from the parent scope.
* @deprecated Use `scope.clone()` and `new Scope()` instead.
*/
static clone(scope?: Scope): Scope;
/**
* @inheritDoc

@@ -130,7 +125,2 @@ */

/**
* Returns the `Transaction` attached to the scope (if there is one).
* @deprecated You should not rely on the transaction, but just use `startSpan()` APIs instead.
*/
getTransaction(): Transaction | undefined;
/**
* @inheritDoc

@@ -169,8 +159,3 @@ */

* @inheritDoc
* @deprecated Use `getScopeData()` instead.
*/
getAttachments(): Attachment[];
/**
* @inheritDoc
*/
clearAttachments(): this;

@@ -177,0 +162,0 @@ /** @inheritDoc */

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

export declare const SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON = "sentry.idle_span_finish_reason";
/** The unit of a measurement, which may be stored as a TimedEvent. */
export declare const SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT = "sentry.measurement_unit";
/** The value of a measurement, which may be stored as a TimedEvent. */
export declare const SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE = "sentry.measurement_value";
//# sourceMappingURL=semanticAttributes.d.ts.map
import { Client, DynamicSamplingContext, Span } from '@sentry/types';
/**
* Freeze the given DSC on the given span.
*/
export declare function freezeDscOnSpan(span: Span, dsc: Partial<DynamicSamplingContext>): void;
/**
* Creates a dynamic sampling context from a client.

@@ -4,0 +8,0 @@ *

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

export { SentryNonRecordingSpan } from './sentryNonRecordingSpan';
export { Transaction } from './transaction';
export { setHttpStatus, getSpanStatusFromHttpCode, } from './spanstatus';

@@ -11,3 +10,5 @@ export { SPAN_STATUS_ERROR, SPAN_STATUS_OK, SPAN_STATUS_UNSET } from './spanstatus';

export { getDynamicSamplingContextFromClient, getDynamicSamplingContextFromSpan } from './dynamicSamplingContext';
export { setMeasurement } from './measurement';
export { setMeasurement, timedEventsToMeasurements } from './measurement';
export { sampleSpan } from './sampling';
export { logSpanEnd, logSpanStart } from './logSpans';
//# sourceMappingURL=index.d.ts.map

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

import { MeasurementUnit } from '@sentry/types';
import { MeasurementUnit, Measurements, TimedEvent } from '@sentry/types';
/**

@@ -6,2 +6,6 @@ * Adds a measurement to the current active transaction.

export declare function setMeasurement(name: string, value: number, unit: MeasurementUnit): void;
/**
* Convert timed events to measurements.
*/
export declare function timedEventsToMeasurements(events: TimedEvent[]): Measurements;
//# sourceMappingURL=measurement.d.ts.map

@@ -1,12 +0,9 @@

import { Options, SamplingContext, TransactionContext } from '@sentry/types';
import { Options, SamplingContext } from '@sentry/types';
/**
* Makes a sampling decision for the given transaction and stores it on the transaction.
* Makes a sampling decision for the given options.
*
* Called every time a transaction is created. Only transactions which emerge with a `sampled` value of `true` will be
* Called every time a root span is created. Only root spans which emerge with a `sampled` value of `true` will be
* sent to Sentry.
*
* This method muttes the given `transaction` and will set the `sampled` value on it.
* It returns the same transaction, for convenience.
*/
export declare function sampleTransaction(transactionContext: TransactionContext, options: Pick<Options, 'tracesSampleRate' | 'tracesSampler' | 'enableTracing'>, samplingContext: SamplingContext): [
export declare function sampleSpan(options: Pick<Options, 'tracesSampleRate' | 'tracesSampler' | 'enableTracing'>, samplingContext: SamplingContext): [
/*sampled*/ boolean,

@@ -13,0 +10,0 @@ /*sampleRate*/ number

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

import { Span, SpanAttributeValue, SpanAttributes, SpanContext, SpanContextData, SpanStatus, SpanTimeInput } from '@sentry/types';
import { SentrySpanArguments, Span, SpanAttributeValue, SpanAttributes, SpanContextData, SpanStatus, SpanTimeInput } from '@sentry/types';
/**

@@ -8,3 +8,3 @@ * A Sentry Span that is non-recording, meaning it will not be sent to Sentry.

private _spanId;
constructor(spanContext?: SpanContext);
constructor(spanContext?: SentrySpanArguments);
/** @inheritdoc */

@@ -24,3 +24,5 @@ spanContext(): SpanContextData;

isRecording(): boolean;
/** @inheritdoc */
addEvent(_name: string, _attributesOrStartTime?: SpanAttributes | SpanTimeInput, _startTime?: SpanTimeInput): this;
}
//# sourceMappingURL=sentryNonRecordingSpan.d.ts.map

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

import { Span, SpanAttributeValue, SpanAttributes, SpanContext, SpanContextData, SpanJSON, SpanStatus, SpanTimeInput, TraceContext, Transaction } from '@sentry/types';
import { SentrySpanArguments, Span, SpanAttributeValue, SpanAttributes, SpanContextData, SpanJSON, SpanStatus, SpanTimeInput, TimedEvent } from '@sentry/types';
/**

@@ -6,14 +6,2 @@ * Span contains all data about a span

export declare class SentrySpan implements Span {
/**
* Data for the span.
* @deprecated Use `spanToJSON(span).atttributes` instead.
*/
data: {
[key: string]: any;
};
/**
* @inheritDoc
* @deprecated Use top level `Sentry.getRootSpan()` instead
*/
transaction?: Transaction;
protected _traceId: string;

@@ -31,3 +19,4 @@ protected _spanId: string;

protected _status?: SpanStatus;
private _logMessage?;
/** The timed events added to this span. */
protected _events: TimedEvent[];
/**

@@ -40,46 +29,5 @@ * You should never call the constructor manually, always use `Sentry.startSpan()`

*/
constructor(spanContext?: SpanContext);
/*
* Attributes for the span.
* @deprecated Use `spanToJSON(span).atttributes` instead.
* Attributes for the span.
* @deprecated Use `setAttributes()` instead.
*/
attributes: SpanAttributes;
/*
* Timestamp in seconds (epoch time) indicating when the span started.
* @deprecated Use `spanToJSON()` instead.
* Timestamp in seconds (epoch time) indicating when the span started.
* @deprecated In v8, you will not be able to update the span start time after creation.
*/
startTimestamp: number;
/*
* Timestamp in seconds when the span ended.
* @deprecated Use `spanToJSON()` instead.
* Timestamp in seconds when the span ended.
* @deprecated Set the end time via `span.end()` instead.
*/
endTimestamp: number | undefined;
constructor(spanContext?: SentrySpanArguments);
/** @inheritdoc */
spanContext(): SpanContextData;
/**
* 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;
/**
* 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;
/** @inheritdoc */

@@ -109,14 +57,2 @@ setAttribute(key: string, value: SpanAttributeValue | undefined): void;

/**
* @inheritDoc
*
* @deprecated Use `spanToJSON()` or access the fields directly instead.
*/
toContext(): SpanContext;
/**
* @inheritDoc
*
* @deprecated Use `spanToTraceContext()` util function instead.
*/
getTraceContext(): TraceContext;
/**
* Get JSON representation of this span.

@@ -133,15 +69,12 @@ *

/**
* Convert the object to JSON.
* @deprecated Use `spanToJSON(span)` instead.
* @inheritdoc
*/
toJSON(): SpanJSON;
addEvent(name: string, attributesOrStartTime?: SpanAttributes | SpanTimeInput, startTime?: SpanTimeInput): this;
/** Emit `spanEnd` when the span is ended. */
private _onSpanEnded;
/**
* Get the merged data for this span.
* For now, this combines `data` and `attributes` together,
* until eventually we can ingest `attributes` directly.
* Finish the transaction & prepare the event to send to Sentry.
*/
private _getData;
/** Emit `spanEnd` when the span is ended. */
private _onSpanEnded;
private _convertSpanToTransaction;
}
//# sourceMappingURL=sentrySpan.d.ts.map

@@ -1,9 +0,8 @@

import { Client, Hub } from '@sentry/types';
import { Client } from '@sentry/types';
/**
* Checks whether given url points to Sentry server
*
* @param url url to verify
*
* TODO(v8): Remove Hub fallback type
*/
export declare function isSentryRequestUrl(url: string, hubOrClient: Hub | Client | undefined): boolean;
export declare function isSentryRequestUrl(url: string, client: Client | undefined): boolean;
//# sourceMappingURL=isSentryRequestUrl.d.ts.map

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

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

@@ -79,11 +79,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';

/**
* Checks if this hub's version is older than the given version.
*
* @param version A version number to compare to.
* @return True if the given version is newer; otherwise false.
*
* @deprecated This will be removed in v8.
*/
isOlderThan(version: number): boolean;
/**
* This binds the given client to the current scope.

@@ -98,14 +89,2 @@ * @param client An SDK client (client) instance.

*
* @deprecated Use `withScope` instead.
*/
pushScope(): ScopeInterface;
/**
* @inheritDoc
*
* @deprecated Use `withScope` instead.
*/
popScope(): boolean;
/**
* @inheritDoc
*
* @deprecated Use `Sentry.withScope()` instead.

@@ -220,13 +199,13 @@ */

/**
* Returns if default PII should be sent to Sentry and propagated in ourgoing requests
* when Tracing is used.
*
* @deprecated Use top-level `getClient().getOptions().sendDefaultPii` instead. This function
* only unnecessarily increased API surface but only wrapped accessing the option.
* Sends the current Session on the scope
*/
shouldSendDefaultPii(): boolean;
private _sendSessionUpdate;
/**
* Sends the current Session on the scope
* Push a scope to the stack.
*/
private _sendSessionUpdate;
private _pushScope;
/**
* Pop a scope from the stack.
*/
private _popScope;
}

@@ -233,0 +212,0 @@ /**

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

export { SDK_VERSION } from './version';
export { getIntegrationsToSetup, addIntegration, defineIntegration, convertIntegrationFnToClass, } from './integration';
export { getIntegrationsToSetup, addIntegration, defineIntegration, } from './integration';
export { applyScopeDataToEvent, mergeScopeData } from './utils/applyScopeDataToEvent';

@@ -37,2 +37,3 @@ export { prepareEvent } from './utils/prepareEvent';

export { spanToTraceHeader, spanToJSON, spanIsSampled, spanToTraceContext, getSpanDescendants, getStatusMessage, getRootSpan, getActiveSpan, addChildSpanToSpan, } from './utils/spanUtils';
export { parseSampleRate } from './utils/parseSampleRate';
export { applySdkMetadata } from './utils/sdkMetadata';

@@ -58,2 +59,3 @@ export { DEFAULT_ENVIRONMENT } from './constants';

export { addTracingHeadersToFetchRequest, instrumentFetchRequest } from './fetch';
export { trpcMiddleware } from './trpc';
//# sourceMappingURL=index.d.ts.map

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

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

@@ -30,9 +30,2 @@ interface Integration {

/**
* Convert a new integration function to the legacy class syntax.
* In v8, we can remove this and instead export the integration functions directly.
*
* @deprecated This will be removed in v8!
*/
export declare function convertIntegrationFnToClass<Fn extends IntegrationFn>(name: string, fn: Fn): IntegrationClass<Integration>;
/**
* Define an integration function that can be used to create an integration instance.

@@ -39,0 +32,0 @@ * Note that this by design hides the implementation details of the integration, as they are considered internal.

@@ -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, 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, User } from '@sentry/types';
/**

@@ -54,7 +54,2 @@ * Holds additional event information.

/**
* Inherit values from the parent scope.
* @deprecated Use `scope.clone()` and `new Scope()` instead.
*/
static clone(scope?: Scope): Scope;
/**
* @inheritDoc

@@ -130,7 +125,2 @@ */

/**
* Returns the `Transaction` attached to the scope (if there is one).
* @deprecated You should not rely on the transaction, but just use `startSpan()` APIs instead.
*/
getTransaction(): Transaction | undefined;
/**
* @inheritDoc

@@ -169,8 +159,3 @@ */

* @inheritDoc
* @deprecated Use `getScopeData()` instead.
*/
getAttachments(): Attachment[];
/**
* @inheritDoc
*/
clearAttachments(): this;

@@ -177,0 +162,0 @@ /** @inheritDoc */

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

export declare const SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON = "sentry.idle_span_finish_reason";
/** The unit of a measurement, which may be stored as a TimedEvent. */
export declare const SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT = "sentry.measurement_unit";
/** The value of a measurement, which may be stored as a TimedEvent. */
export declare const SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE = "sentry.measurement_value";
//# sourceMappingURL=semanticAttributes.d.ts.map
import type { Client, DynamicSamplingContext, Span } from '@sentry/types';
/**
* Freeze the given DSC on the given span.
*/
export declare function freezeDscOnSpan(span: Span, dsc: Partial<DynamicSamplingContext>): void;
/**
* Creates a dynamic sampling context from a client.

@@ -4,0 +8,0 @@ *

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

export { SentryNonRecordingSpan } from './sentryNonRecordingSpan';
export { Transaction } from './transaction';
export { setHttpStatus, getSpanStatusFromHttpCode, } from './spanstatus';

@@ -11,3 +10,5 @@ export { SPAN_STATUS_ERROR, SPAN_STATUS_OK, SPAN_STATUS_UNSET } from './spanstatus';

export { getDynamicSamplingContextFromClient, getDynamicSamplingContextFromSpan } from './dynamicSamplingContext';
export { setMeasurement } from './measurement';
export { setMeasurement, timedEventsToMeasurements } from './measurement';
export { sampleSpan } from './sampling';
export { logSpanEnd, logSpanStart } from './logSpans';
//# sourceMappingURL=index.d.ts.map

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

import type { MeasurementUnit } from '@sentry/types';
import type { MeasurementUnit, Measurements, TimedEvent } from '@sentry/types';
/**

@@ -6,2 +6,6 @@ * Adds a measurement to the current active transaction.

export declare function setMeasurement(name: string, value: number, unit: MeasurementUnit): void;
/**
* Convert timed events to measurements.
*/
export declare function timedEventsToMeasurements(events: TimedEvent[]): Measurements;
//# sourceMappingURL=measurement.d.ts.map

@@ -1,12 +0,9 @@

import type { Options, SamplingContext, TransactionContext } from '@sentry/types';
import type { Options, SamplingContext } from '@sentry/types';
/**
* Makes a sampling decision for the given transaction and stores it on the transaction.
* Makes a sampling decision for the given options.
*
* Called every time a transaction is created. Only transactions which emerge with a `sampled` value of `true` will be
* Called every time a root span is created. Only root spans which emerge with a `sampled` value of `true` will be
* sent to Sentry.
*
* This method muttes the given `transaction` and will set the `sampled` value on it.
* It returns the same transaction, for convenience.
*/
export declare function sampleTransaction(transactionContext: TransactionContext, options: Pick<Options, 'tracesSampleRate' | 'tracesSampler' | 'enableTracing'>, samplingContext: SamplingContext): [sampled: boolean, sampleRate?: number];
export declare function sampleSpan(options: Pick<Options, 'tracesSampleRate' | 'tracesSampler' | 'enableTracing'>, samplingContext: SamplingContext): [sampled: boolean, sampleRate?: number];
//# sourceMappingURL=sampling.d.ts.map

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

import type { Span, SpanAttributeValue, SpanAttributes, SpanContext, SpanContextData, SpanStatus, SpanTimeInput } from '@sentry/types';
import type { SentrySpanArguments, Span, SpanAttributeValue, SpanAttributes, SpanContextData, SpanStatus, SpanTimeInput } from '@sentry/types';
/**

@@ -8,3 +8,3 @@ * A Sentry Span that is non-recording, meaning it will not be sent to Sentry.

private _spanId;
constructor(spanContext?: SpanContext);
constructor(spanContext?: SentrySpanArguments);
/** @inheritdoc */

@@ -24,3 +24,5 @@ spanContext(): SpanContextData;

isRecording(): boolean;
/** @inheritdoc */
addEvent(_name: string, _attributesOrStartTime?: SpanAttributes | SpanTimeInput, _startTime?: SpanTimeInput): this;
}
//# sourceMappingURL=sentryNonRecordingSpan.d.ts.map

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

import type { Span, SpanAttributeValue, SpanAttributes, SpanContext, SpanContextData, SpanJSON, SpanStatus, SpanTimeInput, TraceContext, Transaction } from '@sentry/types';
import type { SentrySpanArguments, Span, SpanAttributeValue, SpanAttributes, SpanContextData, SpanJSON, SpanStatus, SpanTimeInput, TimedEvent } from '@sentry/types';
/**

@@ -6,14 +6,2 @@ * Span contains all data about a span

export declare class SentrySpan implements Span {
/**
* Data for the span.
* @deprecated Use `spanToJSON(span).atttributes` instead.
*/
data: {
[key: string]: any;
};
/**
* @inheritDoc
* @deprecated Use top level `Sentry.getRootSpan()` instead
*/
transaction?: Transaction;
protected _traceId: string;

@@ -31,3 +19,4 @@ protected _spanId: string;

protected _status?: SpanStatus;
private _logMessage?;
/** The timed events added to this span. */
protected _events: TimedEvent[];
/**

@@ -40,49 +29,5 @@ * You should never call the constructor manually, always use `Sentry.startSpan()`

*/
constructor(spanContext?: SpanContext);
/**
* Attributes for the span.
* @deprecated Use `spanToJSON(span).atttributes` instead.
*/
get attributes(): SpanAttributes;
/**
* Attributes for the span.
* @deprecated Use `setAttributes()` instead.
*/
set attributes(attributes: SpanAttributes);
/**
* Timestamp in seconds (epoch time) indicating when the span started.
* @deprecated Use `spanToJSON()` instead.
*/
get startTimestamp(): number;
/**
* Timestamp in seconds (epoch time) indicating when the span started.
* @deprecated In v8, you will not be able to update the span start time after creation.
*/
set startTimestamp(startTime: number);
/**
* Timestamp in seconds when the span ended.
* @deprecated Use `spanToJSON()` instead.
*/
get endTimestamp(): number | undefined;
/**
* Timestamp in seconds when the span ended.
* @deprecated Set the end time via `span.end()` instead.
*/
set endTimestamp(endTime: number | undefined);
constructor(spanContext?: SentrySpanArguments);
/** @inheritdoc */
spanContext(): SpanContextData;
/**
* 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;
/**
* 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;
/** @inheritdoc */

@@ -112,14 +57,2 @@ setAttribute(key: string, value: SpanAttributeValue | undefined): void;

/**
* @inheritDoc
*
* @deprecated Use `spanToJSON()` or access the fields directly instead.
*/
toContext(): SpanContext;
/**
* @inheritDoc
*
* @deprecated Use `spanToTraceContext()` util function instead.
*/
getTraceContext(): TraceContext;
/**
* Get JSON representation of this span.

@@ -136,15 +69,12 @@ *

/**
* Convert the object to JSON.
* @deprecated Use `spanToJSON(span)` instead.
* @inheritdoc
*/
toJSON(): SpanJSON;
addEvent(name: string, attributesOrStartTime?: SpanAttributes | SpanTimeInput, startTime?: SpanTimeInput): this;
/** Emit `spanEnd` when the span is ended. */
private _onSpanEnded;
/**
* Get the merged data for this span.
* For now, this combines `data` and `attributes` together,
* until eventually we can ingest `attributes` directly.
* Finish the transaction & prepare the event to send to Sentry.
*/
private _getData;
/** Emit `spanEnd` when the span is ended. */
private _onSpanEnded;
private _convertSpanToTransaction;
}
//# sourceMappingURL=sentrySpan.d.ts.map

@@ -1,9 +0,8 @@

import type { Client, Hub } from '@sentry/types';
import type { Client } from '@sentry/types';
/**
* Checks whether given url points to Sentry server
*
* @param url url to verify
*
* TODO(v8): Remove Hub fallback type
*/
export declare function isSentryRequestUrl(url: string, hubOrClient: Hub | Client | undefined): boolean;
export declare function isSentryRequestUrl(url: string, client: Client | undefined): boolean;
//# sourceMappingURL=isSentryRequestUrl.d.ts.map

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

export declare const SDK_VERSION = "8.0.0-alpha.7";
export declare const SDK_VERSION = "8.0.0-alpha.8";
//# 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

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