import type * as mongodb from 'mongodb'; import { MongoDBInstrumentationConfig } from './types'; import { InstrumentationBase } from '@opentelemetry/instrumentation'; /** mongodb instrumentation plugin for OpenTelemetry */ export declare class MongoDBInstrumentation extends InstrumentationBase { protected _config: MongoDBInstrumentationConfig; constructor(_config?: MongoDBInstrumentationConfig); init(): any[]; private _getPatches; /** Creates spans for common operations */ private _getPatchOperation; /** Creates spans for command operation */ private _getPatchCommand; /** Creates spans for find operation */ private _getPatchFind; /** Creates spans for find operation */ private _getPatchCursor; /** * 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; /** * Ends a created span. * @param span The created span to end. * @param resultHandler A callback function. */ private _patchEnd; }