Skip to content

Commit

Permalink
chore: use external const for supported versions
Browse files Browse the repository at this point in the history
  • Loading branch information
vmarchaud committed Mar 3, 2021
1 parent b37ee21 commit a5187a0
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,12 @@ import {
isWrapped,
} from '@opentelemetry/instrumentation';

const supportedVersions = ['>=3.3 <4'];

/** mongodb instrumentation plugin for OpenTelemetry */
export class MongoDBInstrumentation extends InstrumentationBase<
typeof mongodb
> {
private _supportedVersions = ['>=3.3 <4']
constructor(protected _config: MongoDbInstrumentationConfig = {}) {
super('@opentelemetry/instrumentation-mongodb', VERSION, _config);
}
Expand All @@ -57,13 +58,13 @@ export class MongoDBInstrumentation extends InstrumentationBase<
return [
new InstrumentationNodeModuleDefinition<typeof mongodb>(
'mongodb',
this._supportedVersions,
supportedVersions,
undefined,
undefined,
[
new InstrumentationNodeModuleFile<WireProtocolInternal>(
'mongodb/lib/core/wireprotocol/index.js',
this._supportedVersions,
supportedVersions,
patch,
unpatch
),
Expand Down

0 comments on commit a5187a0

Please sign in to comment.