Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Plugin<T>

Interface Plugin to apply patch.

Type parameters

  • T

Hierarchy

  • Plugin

Index

Properties

moduleName

moduleName: string

Name of the module that the plugin instrument.

Optional supportedVersions

supportedVersions: string[]

Contains all supported versions. All versions must be compatible with semver format. If the version is not supported, we won't apply instrumentation patch (see enable method). If omitted, all versions of the module will be patched.

Methods

disable

  • disable(): void

enable

  • Method that enables the instrumentation patch.

    Parameters

    • moduleExports: T

      The value of the module.exports property that would normally be exposed by the required module. ex: http, https etc.

    • TracerProvider: TracerProvider

      a tracer provider.

    • logger: Logger

      a logger instance.

    • Optional config: PluginConfig

    Returns T