import { BasePlugin } from '@opentelemetry/core'; import type * as mongodb from 'mongodb'; /** MongoDBCore instrumentation plugin for OpenTelemetry */ export declare class MongoDBPlugin extends BasePlugin { readonly moduleName: string; private readonly _SERVER_METHODS; private readonly _CURSOR_METHODS; private _hasPatched; readonly supportedVersions: string[]; constructor(moduleName: string); /** * Patches MongoDB operations. */ protected patch(): any; /** Unpatches all MongoDB patched functions. */ unpatch(): void; /** Creates spans for Command operations */ private _getPatchCommand; /** * Get the mongodb command type from the object. * @param command Internal mongodb command object */ private _getCommandType; /** * Populate span's attributes by fetching related metadata from the context * @param span span to add attributes to * @param ns mongodb namespace * @param command mongodb internal representation of a command * @param topology mongodb internal representation of the network topology */ private _populateAttributes; /** Creates spans for Cursor operations */ private _getPatchCursor; /** * Ends a created span. * @param span The created span to end. * @param resultHandler A callback function. */ private _patchEnd; } export declare const plugin: MongoDBPlugin;