import { TracerProvider } from '@opentelemetry/api'; import { OldClassPlugin, OldPluginConfig } from '../../../types_plugin_only'; export declare enum HookState { UNINITIALIZED = 0, ENABLED = 1, DISABLED = 2 } /** * Environment variable which will contain list of modules to not load corresponding plugins for * e.g.OTEL_NO_PATCH_MODULES=pg,https,mongodb */ export declare const ENV_PLUGIN_DISABLED_LIST = "OTEL_NO_PATCH_MODULES"; export interface Plugins { [pluginName: string]: OldPluginConfig; } /** * The PluginLoader class can load instrumentation plugins that use a patch * mechanism to enable automatic tracing for specific target modules. */ export declare class PluginLoader { readonly provider: TracerProvider; /** A list of loaded plugins. */ plugins: OldClassPlugin[]; /** * A field that tracks whether the require-in-the-middle hook has been loaded * for the first time, as well as whether the hook body is activated or not. */ private _hookState; /** Constructs a new PluginLoader instance. */ constructor(provider: TracerProvider); /** * Loads a list of plugins. Each plugin module should implement the core * {@link Plugin} interface and export an instance named as 'plugin'. This * function will attach a hook to be called the first time the module is * loaded. * @param Plugins an object whose keys are plugin names and whose * {@link OldPluginConfig} values indicate several configuration options. */ load(plugins: Plugins): PluginLoader; /** Unloads plugins. */ unload(): PluginLoader; } /** * Adds a search path for plugin modules. Intended for testing purposes only. * @param searchPath The path to add. */ export declare function searchPathForTest(searchPath: string): void;