Options
All
  • Public
  • Public/Protected
  • All
Menu

Class InstrumentationBase<ConfigType> Abstract

Base abstract class for instrumenting node plugins

Type Parameters

Hierarchy

Implements

Index

Constructors

  • new InstrumentationBase<ConfigType>(instrumentationName: string, instrumentationVersion: string, config: ConfigType): InstrumentationBase<ConfigType>

Properties

_config: ConfigType
_diag: DiagLogger
_massUnwrap: (<Nodule>(nodules: Nodule[], names: (keyof Nodule)[]) => void) = ...

Type declaration

    • <Nodule>(nodules: Nodule[], names: (keyof Nodule)[]): void
    • Type Parameters

      • Nodule extends object

      Parameters

      • nodules: Nodule[]
      • names: (keyof Nodule)[]

      Returns void

_massWrap: (<Nodule, FieldName>(nodules: Nodule[], names: FieldName[], wrapper: ((original: Nodule[FieldName]) => Nodule[FieldName])) => void) = ...

Type declaration

    • <Nodule, FieldName>(nodules: Nodule[], names: FieldName[], wrapper: ((original: Nodule[FieldName]) => Nodule[FieldName])): void
    • Type Parameters

      • Nodule extends object

      • FieldName extends string | number | symbol

      Parameters

      • nodules: Nodule[]
      • names: FieldName[]
      • wrapper: ((original: Nodule[FieldName]) => Nodule[FieldName])
          • (original: Nodule[FieldName]): Nodule[FieldName]
          • Parameters

            • original: Nodule[FieldName]

            Returns Nodule[FieldName]

      Returns void

_unwrap: (<Nodule>(nodule: Nodule, name: keyof Nodule) => void) = ...

Type declaration

    • <Nodule>(nodule: Nodule, name: keyof Nodule): void
    • Type Parameters

      • Nodule extends object

      Parameters

      • nodule: Nodule
      • name: keyof Nodule

      Returns void

_wrap: (<Nodule, FieldName>(nodule: Nodule, name: FieldName, wrapper: ((original: Nodule[FieldName]) => Nodule[FieldName])) => void) = ...

Type declaration

    • <Nodule, FieldName>(nodule: Nodule, name: FieldName, wrapper: ((original: Nodule[FieldName]) => Nodule[FieldName])): void
    • Type Parameters

      • Nodule extends object

      • FieldName extends string | number | symbol

      Parameters

      • nodule: Nodule
      • name: FieldName
      • wrapper: ((original: Nodule[FieldName]) => Nodule[FieldName])
          • (original: Nodule[FieldName]): Nodule[FieldName]
          • Parameters

            • original: Nodule[FieldName]

            Returns Nodule[FieldName]

      Returns void

instrumentationName: string

Instrumentation Name

instrumentationVersion: string

Instrumentation Version

Accessors

Methods

  • _runSpanCustomizationHook<SpanCustomizationInfoType>(hookHandler: undefined | SpanCustomizationHook<SpanCustomizationInfoType>, triggerName: string, span: Span, info: SpanCustomizationInfoType): void
  • Execute span customization hook, if configured, and log any errors. Any semantics of the trigger and info are defined by the specific instrumentation.

    Type Parameters

    • SpanCustomizationInfoType

    Parameters

    • hookHandler: undefined | SpanCustomizationHook<SpanCustomizationInfoType>

      The optional hook handler which the user has configured via instrumentation config

    • triggerName: string

      The name of the trigger for executing the hook for logging purposes

    • span: Span

      The span to which the hook should be applied

    • info: SpanCustomizationInfoType

      The info object to be passed to the hook, with useful data the hook may use

    Returns void

  • _updateMetricInstruments(): void
  • disable(): void
  • enable(): void
  • getConfig(): ConfigType
  • isEnabled(): boolean
  • setConfig(config: ConfigType): void

Generated using TypeDoc