Options
All
  • Public
  • Public/Protected
  • All
Menu

Base abstract internal class for instrumenting node and web plugins

Type Parameters

Hierarchy

Implements

Index

Constructors

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

Properties

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

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) = shimmer.massWrap

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) = shimmer.unwrap

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) = shimmer.wrap

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
  • setConfig(config: ConfigType): void

Generated using TypeDoc