Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sentry/types

Package Overview
Dependencies
Maintainers
11
Versions
481
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sentry/types - npm Package Compare versions

Comparing version 7.92.0 to 7.93.0

types-ts3.8/opentelemetry.d.ts

2

package.json
{
"name": "@sentry/types",
"version": "7.92.0",
"version": "7.93.0",
"description": "Types for all Sentry JavaScript SDKs",

@@ -5,0 +5,0 @@ "repository": "git://github.com/getsentry/sentry-javascript.git",

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

import { ClientOptions } from './options';
import { ParameterizedString } from './parameterize';
import { Scope } from './scope';

@@ -137,3 +138,3 @@ import { SdkMetadata } from './sdkmetadata';

/** Creates an {@link Event} from primitive inputs to `captureMessage`. */
eventFromMessage(message: string, level?: Severity | SeverityLevel, hint?: EventHint): PromiseLike<Event>;
eventFromMessage(message: ParameterizedString, level?: Severity | SeverityLevel, hint?: EventHint): PromiseLike<Event>;
/** Submits the event to Sentry */

@@ -140,0 +141,0 @@ sendEvent(event: Event, hint?: EventHint): void;

@@ -91,3 +91,2 @@ import { Primitive } from './misc';

};
description?: string;
op?: string;

@@ -94,0 +93,0 @@ parent_span_id?: string;

@@ -22,2 +22,6 @@ import { Attachment } from './attachment';

message?: string;
logentry?: {
message?: string;
params?: string[];
};
timestamp?: number;

@@ -24,0 +28,0 @@ start_timestamp?: number;

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

* @returns The transaction which was just started
*
* @deprecated Use `startSpan()`, `startSpanManual()` or `startInactiveSpan()` instead.
*/

@@ -208,2 +210,4 @@ startTransaction(context: TransactionContext, customSamplingContext?: CustomSamplingContext): Transaction;

* @returns The session which was just started
*
* @deprecated Use top-level `startSession` instead.
*/

@@ -213,2 +217,4 @@ startSession(context?: Session): Session;

* Ends the session that lives on the current scope and sends it to Sentry
*
* @deprecated Use top-level `endSession` instead.
*/

@@ -218,8 +224,14 @@ endSession(): void;

* Sends the current session on the scope to Sentry
*
* @param endSession If set the session will be marked as exited and removed from the scope
*
* @deprecated Use top-level `captureSession` instead.
*/
captureSession(endSession?: boolean): void;
/**
* Returns if default PII should be sent to Sentry and propagated in ourgoing requests
* Returns if default PII should be sent to Sentry and propagated in outgoing 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.
*/

@@ -226,0 +238,0 @@ shouldSendDefaultPii(): boolean;

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

export { Severity, SeverityLevel } from './severity';
export { Span, SpanContext, SpanOrigin, SpanAttributeValue, SpanAttributes } from './span';
export { Span, SpanContext, SpanOrigin, SpanAttributeValue, SpanAttributes, SpanTimeInput, SpanJSON, SpanContextData, TraceFlag, } from './span';
export { StackFrame } from './stackframe';

@@ -50,2 +50,3 @@ export { Stacktrace, StackParser, StackLineParser, StackLineParserFn } from './stacktrace';

export { MetricsAggregator, MetricBucketItem, MetricInstance } from './metrics';
export { ParameterizedString } from './parameterize';
//# sourceMappingURL=index.d.ts.map

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

import { Context, Contexts } from './context';
import { Event, EventHint } from './event';
import { EventProcessor } from './eventprocessor';

@@ -46,2 +47,3 @@ import { Extra, Extras } from './extra';

level?: SeverityLevel;
/** @deprecated This will be removed in v8. */
transactionName?: string;

@@ -117,2 +119,3 @@ span?: Span;

* Sets the transaction name on the scope for future events.
* @deprecated Use extra or tags instead.
*/

@@ -129,10 +132,13 @@ setTransactionName(name?: string): this;

* @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
* 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)
* 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.
*/

@@ -207,3 +213,28 @@ getTransaction(): Transaction | undefined;

getPropagationContext(): PropagationContext;
/**
* Capture an exception for this scope.
*
* @param exception The exception to capture.
* @param hint Optinal additional data to attach to the Sentry event.
* @returns the id of the captured Sentry event.
*/
captureException(exception: unknown, hint?: EventHint): string;
/**
* Capture a message for this scope.
*
* @param exception The exception to capture.
* @param level An optional severity level to report the message with.
* @param hint Optional additional data to attach to the Sentry event.
* @returns the id of the captured message.
*/
captureMessage(message: string, level?: SeverityLevel, hint?: EventHint): string;
/**
* Capture a Sentry event for this scope.
*
* @param exception The event to capture.
* @param hint Optional additional data to attach to the Sentry event.
* @returns the id of the captured event.
*/
captureEvent(event: Event, hint?: EventHint): string;
}
//# sourceMappingURL=scope.d.ts.map
import { TraceContext } from './context';
import { Instrumenter } from './instrumenter';
import { Primitive } from './misc';
import { HrTime } from './opentelemetry';
import { Transaction } from './transaction';

@@ -12,2 +13,53 @@ type SpanOriginType = 'manual' | 'auto';

export type SpanAttributes = Record<string, SpanAttributeValue | undefined>;
/** This type is aligned with the OpenTelemetry TimeInput type. */
export type SpanTimeInput = HrTime | number | Date;
/** A JSON representation of a span. */
export interface SpanJSON {
data?: {
[key: string]: any;
};
description?: string;
op?: string;
parent_span_id?: string;
span_id: string;
start_timestamp: number;
status?: string;
tags?: {
[key: string]: Primitive;
};
timestamp?: number;
trace_id: string;
origin?: SpanOrigin;
}
type TraceFlagNone = 0x0;
type TraceFlagSampled = 0x1;
export type TraceFlag = TraceFlagNone | TraceFlagSampled;
export interface SpanContextData {
/**
* The ID of the trace that this span belongs to. It is worldwide unique
* with practically sufficient probability by being made as 16 randomly
* generated bytes, encoded as a 32 lowercase hex characters corresponding to
* 128 bits.
*/
traceId: string;
/**
* The ID of the Span. It is globally unique with practically sufficient
* probability by being made as 8 randomly generated bytes, encoded as a 16
* lowercase hex characters corresponding to 64 bits.
*/
spanId: string;
/**
* Only true if the SpanContext was propagated from a remote parent.
*/
isRemote?: boolean;
/**
* Trace flags to propagate.
*
* It is represented as 1 byte (bitmap). Bit to represent whether trace is
* sampled or not. When set, the least significant bit documents that the
* caller may have recorded trace data. A caller who does not record trace
* data out-of-band leaves this flag unset.
*/
traceFlags: TraceFlag;
}
/** Interface holding all properties that can be set on a Span on creation. */

@@ -17,2 +69,4 @@ export interface SpanContext {

* Description of the Span.
*
* @deprecated Use `name` instead.
*/

@@ -51,2 +105,3 @@ description?: string;

* Tags of the Span.
* @deprecated Pass `attributes` instead.
*/

@@ -58,2 +113,3 @@ tags?: {

* Data of the Span.
* @deprecated Pass `attributes` instead.
*/

@@ -88,13 +144,21 @@ data?: {

* Human-readable identifier for the span. Identical to span.description.
* @deprecated Use `spanToJSON(span).description` instead.
*/
name: string;
/**
* @inheritDoc
* The ID of the span.
* @deprecated Use `spanContext().spanId` instead.
*/
spanId: string;
/**
* @inheritDoc
* 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;
/**
* @inheritDoc

@@ -104,3 +168,4 @@ */

/**
* @inheritDoc
* Tags for the span.
* @deprecated Use `getSpanAttributes(span)` instead.
*/

@@ -111,3 +176,4 @@ tags: {

/**
* @inheritDoc
* Data for the span.
* @deprecated Use `getSpanAttributes(span)` instead.
*/

@@ -118,3 +184,4 @@ data: {

/**
* @inheritDoc
* Attributes for the span.
* @deprecated Use `getSpanAttributes(span)` instead.
*/

@@ -131,2 +198,7 @@ attributes: SpanAttributes;

/**
* Get context data for this span.
* This includes the spanId & the traceId.
*/
spanContext(): SpanContextData;
/**
* Sets the finish timestamp on the current span.

@@ -139,3 +211,3 @@ * @param endTimestamp Takes an endTimestamp if the end should not be the time when you call this function.

*/
end(endTimestamp?: number): void;
end(endTimestamp?: SpanTimeInput): void;
/**

@@ -148,2 +220,3 @@ * Sets the tag attribute on the current span.

* @param value Tag value
* @deprecated Use `setAttribute()` instead.
*/

@@ -155,2 +228,3 @@ setTag(key: string, value: Primitive): this;

* @param value Data value
* @deprecated Use `setAttribute()` instead.
*/

@@ -192,2 +266,4 @@ setData(key: string, value: any): this;

* Also the `sampled` decision will be inherited.
*
* @deprecated Use `startSpan()`, `startSpanManual()` or `startInactiveSpan()` instead.
*/

@@ -219,22 +295,14 @@ startChild(spanContext?: Pick<SpanContext, Exclude<keyof SpanContext, 'sampled' | 'traceId' | 'parentSpanId'>>): Span;

getTraceContext(): TraceContext;
/** Convert the object to JSON */
toJSON(): {
data?: {
[key: string]: any;
};
description?: string;
op?: string;
parent_span_id?: string;
span_id: string;
start_timestamp: number;
status?: string;
tags?: {
[key: string]: Primitive;
};
timestamp?: number;
trace_id: string;
origin?: SpanOrigin;
};
/**
* Convert the object to JSON.
* @deprecated Use `spanToJSON(span)` instead.
*/
toJSON(): SpanJSON;
/**
* If this is span is actually recording data.
* This will return false if tracing is disabled, this span was not sampled or if the span is already finished.
*/
isRecording(): boolean;
}
export {};
//# sourceMappingURL=span.d.ts.map

@@ -29,2 +29,3 @@ import { Context } from './context';

* Metadata associated with the transaction, for internal SDK use.
* @deprecated Use attributes or store data on the scope instead.
*/

@@ -42,10 +43,22 @@ metadata?: Partial<TransactionMetadata>;

/**
* @inheritDoc
* Human-readable identifier for the transaction.
* @deprecated Use `spanToJSON(span).description` instead.
*/
name: string;
/**
* The ID of the transaction.
* @deprecated Use `spanContext().spanId` instead.
*/
spanId: string;
/**
* @inheritDoc
* The ID of the trace.
* @deprecated Use `spanContext().traceId` instead.
*/
traceId: string;
/**
* Was this transaction chosen to be sent as part of the sample?
* @deprecated Use `spanIsSampled(transaction)` instead.
*/
sampled?: boolean;
/**
* @inheritDoc

@@ -55,3 +68,4 @@ */

/**
* @inheritDoc
* Tags for the transaction.
* @deprecated Use `getSpanAttributes(transaction)` instead.
*/

@@ -62,3 +76,4 @@ tags: {

/**
* @inheritDoc
* Data for the transaction.
* @deprecated Use `getSpanAttributes(transaction)` instead.
*/

@@ -69,7 +84,9 @@ data: {

/**
* @inheritDoc
* Attributes for the transaction.
* @deprecated Use `getSpanAttributes(transaction)` instead.
*/
attributes: SpanAttributes;
/**
* Metadata about the transaction
* Metadata about the transaction.
* @deprecated Use attributes or store data on the scope instead.
*/

@@ -86,3 +103,4 @@ metadata: TransactionMetadata;

/**
* Set the context of a transaction event
* Set the context of a transaction event.
* @deprecated Use either `.setAttribute()`, or set the context on the scope before creating the transaction.
*/

@@ -110,6 +128,10 @@ setContext(key: string, context: Context): void;

* Set metadata for this transaction.
* @hidden
* @deprecated Use attributes or store data on the scope instead.
*/
setMetadata(newMetadata: Partial<TransactionMetadata>): void;
/** Return the current Dynamic Sampling Context of this transaction */
/**
* Return the current Dynamic Sampling Context of this transaction
*
* @deprecated Use top-level `getDynamicSamplingContextFromSpan` instead.
*/
getDynamicSamplingContext(): Partial<DynamicSamplingContext>;

@@ -148,3 +170,6 @@ }

export interface TransactionMetadata {
/** The sample rate used when sampling this transaction */
/**
* The sample rate used when sampling this transaction.
* @deprecated Use `SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE` attribute instead.
*/
sampleRate?: number;

@@ -168,5 +193,11 @@ /**

requestPath?: string;
/** Information on how a transaction name was generated. */
/**
* 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 */
/**
* Metadata for the transaction's spans, keyed by spanId.
* @deprecated This will be removed in v8.
*/
spanMetadata: {

@@ -173,0 +204,0 @@ [spanId: string]: {

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

import type { ClientOptions } from './options';
import type { ParameterizedString } from './parameterize';
import type { Scope } from './scope';

@@ -137,3 +138,3 @@ import type { SdkMetadata } from './sdkmetadata';

/** Creates an {@link Event} from primitive inputs to `captureMessage`. */
eventFromMessage(message: string, level?: Severity | SeverityLevel, hint?: EventHint): PromiseLike<Event>;
eventFromMessage(message: ParameterizedString, level?: Severity | SeverityLevel, hint?: EventHint): PromiseLike<Event>;
/** Submits the event to Sentry */

@@ -140,0 +141,0 @@ sendEvent(event: Event, hint?: EventHint): void;

@@ -91,3 +91,2 @@ import type { Primitive } from './misc';

};
description?: string;
op?: string;

@@ -94,0 +93,0 @@ parent_span_id?: string;

@@ -22,2 +22,6 @@ import type { Attachment } from './attachment';

message?: string;
logentry?: {
message?: string;
params?: string[];
};
timestamp?: number;

@@ -24,0 +28,0 @@ start_timestamp?: number;

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

* @returns The transaction which was just started
*
* @deprecated Use `startSpan()`, `startSpanManual()` or `startInactiveSpan()` instead.
*/

@@ -208,2 +210,4 @@ startTransaction(context: TransactionContext, customSamplingContext?: CustomSamplingContext): Transaction;

* @returns The session which was just started
*
* @deprecated Use top-level `startSession` instead.
*/

@@ -213,2 +217,4 @@ startSession(context?: Session): Session;

* Ends the session that lives on the current scope and sends it to Sentry
*
* @deprecated Use top-level `endSession` instead.
*/

@@ -218,8 +224,14 @@ endSession(): void;

* Sends the current session on the scope to Sentry
*
* @param endSession If set the session will be marked as exited and removed from the scope
*
* @deprecated Use top-level `captureSession` instead.
*/
captureSession(endSession?: boolean): void;
/**
* Returns if default PII should be sent to Sentry and propagated in ourgoing requests
* Returns if default PII should be sent to Sentry and propagated in outgoing 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.
*/

@@ -226,0 +238,0 @@ shouldSendDefaultPii(): boolean;

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

export type { Severity, SeverityLevel } from './severity';
export type { Span, SpanContext, SpanOrigin, SpanAttributeValue, SpanAttributes } from './span';
export type { Span, SpanContext, SpanOrigin, SpanAttributeValue, SpanAttributes, SpanTimeInput, SpanJSON, SpanContextData, TraceFlag, } from './span';
export type { StackFrame } from './stackframe';

@@ -50,2 +50,3 @@ export type { Stacktrace, StackParser, StackLineParser, StackLineParserFn } from './stacktrace';

export type { MetricsAggregator, MetricBucketItem, MetricInstance } from './metrics';
export type { ParameterizedString } from './parameterize';
//# sourceMappingURL=index.d.ts.map

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

import type { Context, Contexts } from './context';
import type { Event, EventHint } from './event';
import type { EventProcessor } from './eventprocessor';

@@ -46,2 +47,3 @@ import type { Extra, Extras } from './extra';

level?: SeverityLevel;
/** @deprecated This will be removed in v8. */
transactionName?: string;

@@ -117,2 +119,3 @@ span?: Span;

* Sets the transaction name on the scope for future events.
* @deprecated Use extra or tags instead.
*/

@@ -129,10 +132,13 @@ setTransactionName(name?: string): this;

* @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
* 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)
* 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.
*/

@@ -207,3 +213,28 @@ getTransaction(): Transaction | undefined;

getPropagationContext(): PropagationContext;
/**
* Capture an exception for this scope.
*
* @param exception The exception to capture.
* @param hint Optinal additional data to attach to the Sentry event.
* @returns the id of the captured Sentry event.
*/
captureException(exception: unknown, hint?: EventHint): string;
/**
* Capture a message for this scope.
*
* @param exception The exception to capture.
* @param level An optional severity level to report the message with.
* @param hint Optional additional data to attach to the Sentry event.
* @returns the id of the captured message.
*/
captureMessage(message: string, level?: SeverityLevel, hint?: EventHint): string;
/**
* Capture a Sentry event for this scope.
*
* @param exception The event to capture.
* @param hint Optional additional data to attach to the Sentry event.
* @returns the id of the captured event.
*/
captureEvent(event: Event, hint?: EventHint): string;
}
//# sourceMappingURL=scope.d.ts.map
import type { TraceContext } from './context';
import type { Instrumenter } from './instrumenter';
import type { Primitive } from './misc';
import type { HrTime } from './opentelemetry';
import type { Transaction } from './transaction';

@@ -12,2 +13,53 @@ type SpanOriginType = 'manual' | 'auto';

export type SpanAttributes = Record<string, SpanAttributeValue | undefined>;
/** This type is aligned with the OpenTelemetry TimeInput type. */
export type SpanTimeInput = HrTime | number | Date;
/** A JSON representation of a span. */
export interface SpanJSON {
data?: {
[key: string]: any;
};
description?: string;
op?: string;
parent_span_id?: string;
span_id: string;
start_timestamp: number;
status?: string;
tags?: {
[key: string]: Primitive;
};
timestamp?: number;
trace_id: string;
origin?: SpanOrigin;
}
type TraceFlagNone = 0x0;
type TraceFlagSampled = 0x1;
export type TraceFlag = TraceFlagNone | TraceFlagSampled;
export interface SpanContextData {
/**
* The ID of the trace that this span belongs to. It is worldwide unique
* with practically sufficient probability by being made as 16 randomly
* generated bytes, encoded as a 32 lowercase hex characters corresponding to
* 128 bits.
*/
traceId: string;
/**
* The ID of the Span. It is globally unique with practically sufficient
* probability by being made as 8 randomly generated bytes, encoded as a 16
* lowercase hex characters corresponding to 64 bits.
*/
spanId: string;
/**
* Only true if the SpanContext was propagated from a remote parent.
*/
isRemote?: boolean;
/**
* Trace flags to propagate.
*
* It is represented as 1 byte (bitmap). Bit to represent whether trace is
* sampled or not. When set, the least significant bit documents that the
* caller may have recorded trace data. A caller who does not record trace
* data out-of-band leaves this flag unset.
*/
traceFlags: TraceFlag;
}
/** Interface holding all properties that can be set on a Span on creation. */

@@ -17,2 +69,4 @@ export interface SpanContext {

* Description of the Span.
*
* @deprecated Use `name` instead.
*/

@@ -51,2 +105,3 @@ description?: string;

* Tags of the Span.
* @deprecated Pass `attributes` instead.
*/

@@ -58,2 +113,3 @@ tags?: {

* Data of the Span.
* @deprecated Pass `attributes` instead.
*/

@@ -88,13 +144,21 @@ data?: {

* Human-readable identifier for the span. Identical to span.description.
* @deprecated Use `spanToJSON(span).description` instead.
*/
name: string;
/**
* @inheritDoc
* The ID of the span.
* @deprecated Use `spanContext().spanId` instead.
*/
spanId: string;
/**
* @inheritDoc
* 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;
/**
* @inheritDoc

@@ -104,3 +168,4 @@ */

/**
* @inheritDoc
* Tags for the span.
* @deprecated Use `getSpanAttributes(span)` instead.
*/

@@ -111,3 +176,4 @@ tags: {

/**
* @inheritDoc
* Data for the span.
* @deprecated Use `getSpanAttributes(span)` instead.
*/

@@ -118,3 +184,4 @@ data: {

/**
* @inheritDoc
* Attributes for the span.
* @deprecated Use `getSpanAttributes(span)` instead.
*/

@@ -131,2 +198,7 @@ attributes: SpanAttributes;

/**
* Get context data for this span.
* This includes the spanId & the traceId.
*/
spanContext(): SpanContextData;
/**
* Sets the finish timestamp on the current span.

@@ -139,3 +211,3 @@ * @param endTimestamp Takes an endTimestamp if the end should not be the time when you call this function.

*/
end(endTimestamp?: number): void;
end(endTimestamp?: SpanTimeInput): void;
/**

@@ -148,2 +220,3 @@ * Sets the tag attribute on the current span.

* @param value Tag value
* @deprecated Use `setAttribute()` instead.
*/

@@ -155,2 +228,3 @@ setTag(key: string, value: Primitive): this;

* @param value Data value
* @deprecated Use `setAttribute()` instead.
*/

@@ -192,2 +266,4 @@ setData(key: string, value: any): this;

* Also the `sampled` decision will be inherited.
*
* @deprecated Use `startSpan()`, `startSpanManual()` or `startInactiveSpan()` instead.
*/

@@ -219,22 +295,14 @@ startChild(spanContext?: Pick<SpanContext, Exclude<keyof SpanContext, 'sampled' | 'traceId' | 'parentSpanId'>>): Span;

getTraceContext(): TraceContext;
/** Convert the object to JSON */
toJSON(): {
data?: {
[key: string]: any;
};
description?: string;
op?: string;
parent_span_id?: string;
span_id: string;
start_timestamp: number;
status?: string;
tags?: {
[key: string]: Primitive;
};
timestamp?: number;
trace_id: string;
origin?: SpanOrigin;
};
/**
* Convert the object to JSON.
* @deprecated Use `spanToJSON(span)` instead.
*/
toJSON(): SpanJSON;
/**
* If this is span is actually recording data.
* This will return false if tracing is disabled, this span was not sampled or if the span is already finished.
*/
isRecording(): boolean;
}
export {};
//# sourceMappingURL=span.d.ts.map

@@ -29,2 +29,3 @@ import type { Context } from './context';

* Metadata associated with the transaction, for internal SDK use.
* @deprecated Use attributes or store data on the scope instead.
*/

@@ -42,10 +43,22 @@ metadata?: Partial<TransactionMetadata>;

/**
* @inheritDoc
* Human-readable identifier for the transaction.
* @deprecated Use `spanToJSON(span).description` instead.
*/
name: string;
/**
* The ID of the transaction.
* @deprecated Use `spanContext().spanId` instead.
*/
spanId: string;
/**
* @inheritDoc
* The ID of the trace.
* @deprecated Use `spanContext().traceId` instead.
*/
traceId: string;
/**
* Was this transaction chosen to be sent as part of the sample?
* @deprecated Use `spanIsSampled(transaction)` instead.
*/
sampled?: boolean;
/**
* @inheritDoc

@@ -55,3 +68,4 @@ */

/**
* @inheritDoc
* Tags for the transaction.
* @deprecated Use `getSpanAttributes(transaction)` instead.
*/

@@ -62,3 +76,4 @@ tags: {

/**
* @inheritDoc
* Data for the transaction.
* @deprecated Use `getSpanAttributes(transaction)` instead.
*/

@@ -69,7 +84,9 @@ data: {

/**
* @inheritDoc
* Attributes for the transaction.
* @deprecated Use `getSpanAttributes(transaction)` instead.
*/
attributes: SpanAttributes;
/**
* Metadata about the transaction
* Metadata about the transaction.
* @deprecated Use attributes or store data on the scope instead.
*/

@@ -86,3 +103,4 @@ metadata: TransactionMetadata;

/**
* Set the context of a transaction event
* Set the context of a transaction event.
* @deprecated Use either `.setAttribute()`, or set the context on the scope before creating the transaction.
*/

@@ -110,6 +128,10 @@ setContext(key: string, context: Context): void;

* Set metadata for this transaction.
* @hidden
* @deprecated Use attributes or store data on the scope instead.
*/
setMetadata(newMetadata: Partial<TransactionMetadata>): void;
/** Return the current Dynamic Sampling Context of this transaction */
/**
* Return the current Dynamic Sampling Context of this transaction
*
* @deprecated Use top-level `getDynamicSamplingContextFromSpan` instead.
*/
getDynamicSamplingContext(): Partial<DynamicSamplingContext>;

@@ -148,3 +170,6 @@ }

export interface TransactionMetadata {
/** The sample rate used when sampling this transaction */
/**
* The sample rate used when sampling this transaction.
* @deprecated Use `SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE` attribute instead.
*/
sampleRate?: number;

@@ -168,5 +193,11 @@ /**

requestPath?: string;
/** Information on how a transaction name was generated. */
/**
* 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 */
/**
* Metadata for the transaction's spans, keyed by spanId.
* @deprecated This will be removed in v8.
*/
spanMetadata: {

@@ -173,0 +204,0 @@ [spanId: string]: {

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc