JSDoc

Hierarchy

Implements

Properties

_hub: Hub

The reference to the current hub.

data: {
    [key: string]: any;
} = {}

Data of the Span.

Type declaration

  • [key: string]: any
description?: string

Description of the Span.

endTimestamp?: number

Timestamp in seconds when the span ended.

instrumenter: Instrumenter = 'sentry'

The instrumenter that created this span.

op?: string

Operation of the Span.

parentSpanId?: string

Parent Span ID

sampled?: boolean

Was this span chosen to be sent as part of the sample?

spanId: string = ...

Span ID

spanRecorder?: SpanRecorder

List of spans that were finalized

startTimestamp: number = ...

Timestamp in seconds when the span was created.

status?: string

Internal keeper of the status

tags: {
    [key: string]: Primitive;
} = {}

Tags of the Span.

Type declaration

  • [key: string]: Primitive
traceId: string = ...

Trace ID

transaction?: Transaction

The transaction containing this span

Accessors

Methods

  • Sets the finish timestamp on the current span.

    Parameters

    • Optional endTimestamp: number

      Takes an endTimestamp if the end should not be the time when you call this function.

    Returns undefined | string

  • Attaches SpanRecorder to the span itself

    Parameters

    • maxlen: number = 1000

      maximum number of spans that can be recorded

    Returns void

  • Internal

    Override the current hub with a new one. Used if you want another hub to finish the transaction.

    Parameters

    Returns void

  • Set observed measurement for this transaction.

    Parameters

    • name: string

      Name of the measurement

    • value: number

      Value of the measurement

    • unit: MeasurementUnit = ''

      Unit of the measurement. (Defaults to an empty string)

    Returns void

  • Parameters

    • newMetadata: Partial<TransactionMetadata>

    Returns void

    Inherit Doc

  • Creates a new Span while setting the current Span.id as parentSpanId. Also the sampled decision will be inherited.

    Parameters

    • Optional spanContext: Pick<SpanContext, "status" | "tags" | "data" | "description" | "op" | "instrumenter" | "spanId" | "startTimestamp" | "endTimestamp">

    Returns Span

  • Convert the object to JSON

    Returns {
        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;
    }

    • Optional data?: {
          [key: string]: any;
      }
      • [key: string]: any
    • Optional description?: string
    • Optional op?: string
    • Optional parent_span_id?: string
    • span_id: string
    • start_timestamp: number
    • Optional status?: string
    • Optional tags?: {
          [key: string]: Primitive;
      }
      • [key: string]: Primitive
    • Optional timestamp?: number
    • trace_id: string

Generated using TypeDoc