OpenTelemetry SDK
    Preparing search index...

    Interface InstrumentationModuleDefinition

    interface InstrumentationModuleDefinition {
        files: InstrumentationModuleFile[];
        includePrerelease?: boolean;
        moduleExports?: any;
        moduleVersion?: string;
        name: string;
        patch?: (moduleExports: any, moduleVersion?: string) => any;
        supportedVersions: string[];
        unpatch?: (moduleExports: any, moduleVersion?: string) => void;
    }

    Implemented by

    Index

    Properties

    Module internal files to be patched

    includePrerelease?: boolean

    If set to true, the includePrerelease check will be included when calling semver.satisfies

    moduleExports?: any
    moduleVersion?: string

    Instrumented module version

    name: string

    Module name or path

    patch?: (moduleExports: any, moduleVersion?: string) => any

    Method to patch the instrumentation

    supportedVersions: string[]

    Supported version of module.

    A module version is supported if one of the supportedVersions in the array satisfies the module version. The syntax of the version is checked with the satisfies function of "The semantic versioner for npm". 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.

    It is recommended to always specify a range that is bound to a major version, to avoid breaking changes. New major versions should be reviewed and tested before being added to the supportedVersions array.

    Example: ['>=1.2.3 <3']

    unpatch?: (moduleExports: any, moduleVersion?: string) => void

    Method to unpatch the instrumentation