Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NoOpSpan

Package version

A no-op implementation of Span that can safely be used without side-effects.

Hierarchy

Implements

  • any

Index

Methods

addEvent

  • addEvent(_name: string, _attributes?: Attributes): this
  • Adds an event to the Span

    Parameters

    • _name: string

      The name of the event

    • Optional _attributes: Attributes

      The associated attributes to add for this event

    Returns this

context

end

  • end(_endTime?: undefined | number): void
  • Marks the end of Span execution.

    Parameters

    • Optional _endTime: undefined | number

      The time to use as the Span's end time. Defaults to the current time.

    Returns void

isRecording

  • isRecording(): boolean

setAttribute

  • setAttribute(_key: string, _value: unknown): this
  • Sets an attribute on the Span

    Parameters

    • _key: string

      the attribute key

    • _value: unknown

      the attribute value

    Returns this

setAttributes

  • setAttributes(_attributes: Attributes): this
  • Sets attributes on the Span

    Parameters

    • _attributes: Attributes

      the attributes to add

    Returns this

setStatus

  • setStatus(_status: Status): this
  • Sets a status on the span. Overrides the default of CanonicalCode.OK.

    Parameters

    • _status: Status

      The status to set.

    Returns this

updateName

  • updateName(_name: string): this

Generated using TypeDoc