diff --git a/plugins/node/instrumentation-dataloader/src/index.ts b/plugins/node/instrumentation-dataloader/src/index.ts index 400b81745a..a41cc4c8df 100644 --- a/plugins/node/instrumentation-dataloader/src/index.ts +++ b/plugins/node/instrumentation-dataloader/src/index.ts @@ -15,4 +15,4 @@ */ export * from './types'; -export { DataloaderInstrumentation } from './instrumentation'; +export * from './instrumentation'; diff --git a/plugins/node/instrumentation-fs/src/index.ts b/plugins/node/instrumentation-fs/src/index.ts index 27e4d2717e..c26f998cff 100644 --- a/plugins/node/instrumentation-fs/src/index.ts +++ b/plugins/node/instrumentation-fs/src/index.ts @@ -14,11 +14,5 @@ * limitations under the License. */ -import FsInstrumentation from './instrumentation'; - -export { FsInstrumentation }; - export * from './instrumentation'; export * from './types'; - -export default FsInstrumentation; diff --git a/plugins/node/instrumentation-fs/src/instrumentation.ts b/plugins/node/instrumentation-fs/src/instrumentation.ts index 57db632a0e..281e43fc10 100644 --- a/plugins/node/instrumentation-fs/src/instrumentation.ts +++ b/plugins/node/instrumentation-fs/src/instrumentation.ts @@ -51,7 +51,7 @@ function patchedFunctionWithOriginalProperties< return Object.assign(patchedFunction, original); } -export default class FsInstrumentation extends InstrumentationBase { +export class FsInstrumentation extends InstrumentationBase { constructor(config: FsInstrumentationConfig = {}) { super(PACKAGE_NAME, PACKAGE_VERSION, config); } diff --git a/plugins/node/instrumentation-fs/test/fs.test.ts b/plugins/node/instrumentation-fs/test/fs.test.ts index e8f97b6ab2..f8d8e4c9e9 100644 --- a/plugins/node/instrumentation-fs/test/fs.test.ts +++ b/plugins/node/instrumentation-fs/test/fs.test.ts @@ -22,7 +22,7 @@ import { } from '@opentelemetry/sdk-trace-base'; import * as assert from 'assert'; import { promisify } from 'util'; -import Instrumentation from '../src'; +import { FsInstrumentation } from '../src'; import * as sinon from 'sinon'; import type * as FSType from 'fs'; import tests, { TestCase, TestCreator } from './definitions'; @@ -66,12 +66,12 @@ provider.addSpanProcessor(new SimpleSpanProcessor(memoryExporter)); describe('fs instrumentation', () => { let contextManager: AsyncHooksContextManager; let fs: typeof FSType; - let plugin: Instrumentation; + let plugin: FsInstrumentation; beforeEach(async () => { contextManager = new AsyncHooksContextManager(); context.setGlobalContextManager(contextManager.enable()); - plugin = new Instrumentation(pluginConfig); + plugin = new FsInstrumentation(pluginConfig); plugin.setTracerProvider(provider); plugin.enable(); fs = require('fs'); diff --git a/plugins/node/instrumentation-fs/test/fsHooks.test.ts b/plugins/node/instrumentation-fs/test/fsHooks.test.ts index 1ae9e5b0eb..bdffab00e8 100644 --- a/plugins/node/instrumentation-fs/test/fsHooks.test.ts +++ b/plugins/node/instrumentation-fs/test/fsHooks.test.ts @@ -19,7 +19,7 @@ import { SimpleSpanProcessor, } from '@opentelemetry/sdk-trace-base'; import * as assert from 'assert'; -import Instrumentation from '../src'; +import { FsInstrumentation } from '../src'; import * as sinon from 'sinon'; import type * as FSType from 'fs'; import type { FsInstrumentationConfig } from '../src/types'; @@ -76,11 +76,11 @@ const assertFailingCallHooks = (expectedFunctionName: string) => { }; describe('fs instrumentation: hooks', () => { - let plugin: Instrumentation; + let plugin: FsInstrumentation; let fs: typeof FSType; beforeEach(async () => { - plugin = new Instrumentation(pluginConfig); + plugin = new FsInstrumentation(pluginConfig); plugin.setTracerProvider(provider); plugin.setConfig(pluginConfig as FsInstrumentationConfig); plugin.enable(); diff --git a/plugins/node/instrumentation-fs/test/fsPromises.test.ts b/plugins/node/instrumentation-fs/test/fsPromises.test.ts index 9af00a13a5..0400f57ee7 100644 --- a/plugins/node/instrumentation-fs/test/fsPromises.test.ts +++ b/plugins/node/instrumentation-fs/test/fsPromises.test.ts @@ -21,7 +21,7 @@ import { SimpleSpanProcessor, } from '@opentelemetry/sdk-trace-base'; import * as assert from 'assert'; -import Instrumentation from '../src'; +import { FsInstrumentation } from '../src'; import * as sinon from 'sinon'; import type * as FSPromisesType from 'fs/promises'; import tests, { FsFunction, TestCase, TestCreator } from './definitions'; @@ -45,12 +45,12 @@ provider.addSpanProcessor(new SimpleSpanProcessor(memoryExporter)); describe('fs/promises instrumentation', () => { let contextManager: AsyncHooksContextManager; let fsPromises: typeof FSPromisesType; - let plugin: Instrumentation; + let plugin: FsInstrumentation; beforeEach(async () => { contextManager = new AsyncHooksContextManager(); context.setGlobalContextManager(contextManager.enable()); - plugin = new Instrumentation(pluginConfig); + plugin = new FsInstrumentation(pluginConfig); plugin.setTracerProvider(provider); plugin.enable(); fsPromises = require('fs/promises'); diff --git a/plugins/node/instrumentation-fs/test/fsPromisesHooks.test.ts b/plugins/node/instrumentation-fs/test/fsPromisesHooks.test.ts index d69be21ed9..be3db71202 100644 --- a/plugins/node/instrumentation-fs/test/fsPromisesHooks.test.ts +++ b/plugins/node/instrumentation-fs/test/fsPromisesHooks.test.ts @@ -19,7 +19,7 @@ import { SimpleSpanProcessor, } from '@opentelemetry/sdk-trace-base'; import * as assert from 'assert'; -import Instrumentation from '../src'; +import { FsInstrumentation } from '../src'; import * as sinon from 'sinon'; import type * as FSPromisesType from 'fs/promises'; import type { FsInstrumentationConfig } from '../src/types'; @@ -80,11 +80,11 @@ const assertFailingCallHooks = (expectedFunctionName: string) => { const fsConstantsR_OK = 4; describe('fs/promises instrumentation: hooks', () => { - let plugin: Instrumentation; + let plugin: FsInstrumentation; let fsPromises: typeof FSPromisesType; beforeEach(async () => { - plugin = new Instrumentation(pluginConfig); + plugin = new FsInstrumentation(pluginConfig); plugin.setTracerProvider(provider); plugin.setConfig(pluginConfig as FsInstrumentationConfig); plugin.enable(); diff --git a/plugins/node/instrumentation-fs/test/parent.test.ts b/plugins/node/instrumentation-fs/test/parent.test.ts index 9ca6d90059..903e7e48e8 100644 --- a/plugins/node/instrumentation-fs/test/parent.test.ts +++ b/plugins/node/instrumentation-fs/test/parent.test.ts @@ -18,7 +18,7 @@ import { InMemorySpanExporter, SimpleSpanProcessor, } from '@opentelemetry/sdk-trace-base'; -import Instrumentation from '../src'; +import { FsInstrumentation } from '../src'; import * as assert from 'assert'; import type * as FSType from 'fs'; import type { FsInstrumentationConfig } from '../src/types'; @@ -32,14 +32,14 @@ provider.addSpanProcessor(new SimpleSpanProcessor(memoryExporter)); const tracer = provider.getTracer('default'); describe('fs instrumentation: requireParentSpan', () => { - let plugin: Instrumentation; + let plugin: FsInstrumentation; let fs: typeof FSType; let ambientContext: api.Context; let endRootSpan: () => void; let expectedAmbientSpanCount: number; const initializePlugin = (pluginConfig: FsInstrumentationConfig) => { - plugin = new Instrumentation(); + plugin = new FsInstrumentation(); plugin.setTracerProvider(provider); plugin.setConfig(pluginConfig); plugin.enable(); diff --git a/plugins/node/instrumentation-lru-memoizer/src/index.ts b/plugins/node/instrumentation-lru-memoizer/src/index.ts index fc85cdf0f8..24c76056a1 100644 --- a/plugins/node/instrumentation-lru-memoizer/src/index.ts +++ b/plugins/node/instrumentation-lru-memoizer/src/index.ts @@ -14,8 +14,4 @@ * limitations under the License. */ -import LruMemoizerInstrumentation from './instrumentation'; - -export { LruMemoizerInstrumentation }; - -export default LruMemoizerInstrumentation; +export * from './instrumentation'; diff --git a/plugins/node/instrumentation-lru-memoizer/src/instrumentation.ts b/plugins/node/instrumentation-lru-memoizer/src/instrumentation.ts index 6224fe7edf..bfb7465e62 100644 --- a/plugins/node/instrumentation-lru-memoizer/src/instrumentation.ts +++ b/plugins/node/instrumentation-lru-memoizer/src/instrumentation.ts @@ -22,7 +22,7 @@ import { } from '@opentelemetry/instrumentation'; import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; -export default class LruMemoizerInstrumentation extends InstrumentationBase { +export class LruMemoizerInstrumentation extends InstrumentationBase { constructor(config: InstrumentationConfig = {}) { super(PACKAGE_NAME, PACKAGE_VERSION, config); } diff --git a/plugins/node/instrumentation-lru-memoizer/test/index.test.ts b/plugins/node/instrumentation-lru-memoizer/test/index.test.ts index aced9416b4..42f7605046 100644 --- a/plugins/node/instrumentation-lru-memoizer/test/index.test.ts +++ b/plugins/node/instrumentation-lru-memoizer/test/index.test.ts @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import LruMemoizerInstrumentation from '../src'; +import { LruMemoizerInstrumentation } from '../src'; import { trace, context } from '@opentelemetry/api'; import { expect } from 'expect'; diff --git a/plugins/node/instrumentation-runtime-node/src/index.ts b/plugins/node/instrumentation-runtime-node/src/index.ts index 7e29b98aeb..c26f998cff 100644 --- a/plugins/node/instrumentation-runtime-node/src/index.ts +++ b/plugins/node/instrumentation-runtime-node/src/index.ts @@ -13,5 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -export { RuntimeNodeInstrumentation } from './instrumentation'; -export { RuntimeNodeInstrumentationConfig } from './types'; + +export * from './instrumentation'; +export * from './types'; diff --git a/plugins/node/instrumentation-tedious/src/index.ts b/plugins/node/instrumentation-tedious/src/index.ts index add054c2a8..c26f998cff 100644 --- a/plugins/node/instrumentation-tedious/src/index.ts +++ b/plugins/node/instrumentation-tedious/src/index.ts @@ -14,9 +14,5 @@ * limitations under the License. */ -import { TediousInstrumentation } from './instrumentation'; - export * from './instrumentation'; -export default TediousInstrumentation; - export * from './types'; diff --git a/plugins/node/instrumentation-undici/src/index.ts b/plugins/node/instrumentation-undici/src/index.ts index 80c6504fbc..809207c6ce 100644 --- a/plugins/node/instrumentation-undici/src/index.ts +++ b/plugins/node/instrumentation-undici/src/index.ts @@ -14,12 +14,5 @@ * limitations under the License. */ -export { UndiciInstrumentation } from './undici'; -export { - UndiciRequest, - UndiciResponse, - IgnoreRequestFunction, - RequestHookFunction, - StartSpanHookFunction, - UndiciInstrumentationConfig, -} from './types'; +export * from './undici'; +export * from './types'; diff --git a/plugins/node/opentelemetry-instrumentation-generic-pool/src/index.ts b/plugins/node/opentelemetry-instrumentation-generic-pool/src/index.ts index 3b04638af8..24c76056a1 100644 --- a/plugins/node/opentelemetry-instrumentation-generic-pool/src/index.ts +++ b/plugins/node/opentelemetry-instrumentation-generic-pool/src/index.ts @@ -14,7 +14,4 @@ * limitations under the License. */ -import GenericPoolInstrumentation from './instrumentation'; - -export { GenericPoolInstrumentation }; -export default GenericPoolInstrumentation; +export * from './instrumentation'; diff --git a/plugins/node/opentelemetry-instrumentation-generic-pool/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-generic-pool/src/instrumentation.ts index aed3416f36..202fb2b411 100644 --- a/plugins/node/opentelemetry-instrumentation-generic-pool/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-generic-pool/src/instrumentation.ts @@ -28,7 +28,7 @@ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; const MODULE_NAME = 'generic-pool'; -export default class Instrumentation extends InstrumentationBase { +export class GenericPoolInstrumentation extends InstrumentationBase { // only used for v2 - v2.3) private _isDisabled = false; diff --git a/plugins/node/opentelemetry-instrumentation-generic-pool/test/index.test.ts b/plugins/node/opentelemetry-instrumentation-generic-pool/test/index.test.ts index c3794e0324..d7453d204f 100644 --- a/plugins/node/opentelemetry-instrumentation-generic-pool/test/index.test.ts +++ b/plugins/node/opentelemetry-instrumentation-generic-pool/test/index.test.ts @@ -22,8 +22,8 @@ import { SimpleSpanProcessor, } from '@opentelemetry/sdk-trace-base'; -import Instrumentation from '../src'; -const plugin = new Instrumentation(); +import { GenericPoolInstrumentation } from '../src'; +const plugin = new GenericPoolInstrumentation(); import * as util from 'util'; import * as genericPool from 'generic-pool'; diff --git a/plugins/node/opentelemetry-instrumentation-knex/src/index.ts b/plugins/node/opentelemetry-instrumentation-knex/src/index.ts index 4d2b9abbeb..c26f998cff 100644 --- a/plugins/node/opentelemetry-instrumentation-knex/src/index.ts +++ b/plugins/node/opentelemetry-instrumentation-knex/src/index.ts @@ -14,9 +14,5 @@ * limitations under the License. */ -import { KnexInstrumentation } from './instrumentation'; - export * from './instrumentation'; -export default KnexInstrumentation; - export * from './types'; diff --git a/plugins/node/opentelemetry-instrumentation-knex/test/index.test.ts b/plugins/node/opentelemetry-instrumentation-knex/test/index.test.ts index 9072465c47..344fb94400 100644 --- a/plugins/node/opentelemetry-instrumentation-knex/test/index.test.ts +++ b/plugins/node/opentelemetry-instrumentation-knex/test/index.test.ts @@ -23,8 +23,8 @@ import { } from '@opentelemetry/sdk-trace-base'; import * as assert from 'assert'; -import Instrumentation from '../src'; -const plugin = new Instrumentation({ +import { KnexInstrumentation } from '../src'; +const plugin = new KnexInstrumentation({ maxQueryLength: 50, }); diff --git a/plugins/node/opentelemetry-instrumentation-memcached/src/index.ts b/plugins/node/opentelemetry-instrumentation-memcached/src/index.ts index 22efa9b0a5..c26f998cff 100644 --- a/plugins/node/opentelemetry-instrumentation-memcached/src/index.ts +++ b/plugins/node/opentelemetry-instrumentation-memcached/src/index.ts @@ -14,9 +14,5 @@ * limitations under the License. */ -import { Instrumentation } from './instrumentation'; -export * from './types'; - export * from './instrumentation'; -export default Instrumentation; -export { Instrumentation as MemcachedInstrumentation }; +export * from './types'; diff --git a/plugins/node/opentelemetry-instrumentation-memcached/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-memcached/src/instrumentation.ts index f29bf1ca14..53676b7468 100644 --- a/plugins/node/opentelemetry-instrumentation-memcached/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-memcached/src/instrumentation.ts @@ -31,7 +31,7 @@ import * as utils from './utils'; import { InstrumentationConfig } from './types'; import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; -export class Instrumentation extends InstrumentationBase { +export class MemcachedInstrumentation extends InstrumentationBase { static readonly COMPONENT = 'memcached'; static readonly COMMON_ATTRIBUTES = { [SEMATTRS_DB_SYSTEM]: DBSYSTEMVALUES_MEMCACHED, @@ -44,12 +44,16 @@ export class Instrumentation extends InstrumentationBase { super( PACKAGE_NAME, PACKAGE_VERSION, - Object.assign({}, Instrumentation.DEFAULT_CONFIG, config) + Object.assign({}, MemcachedInstrumentation.DEFAULT_CONFIG, config) ); } override setConfig(config: InstrumentationConfig = {}) { - this._config = Object.assign({}, Instrumentation.DEFAULT_CONFIG, config); + this._config = Object.assign( + {}, + MemcachedInstrumentation.DEFAULT_CONFIG, + config + ); } init() { @@ -97,7 +101,7 @@ export class Instrumentation extends InstrumentationBase { kind: api.SpanKind.CLIENT, attributes: { 'memcached.version': moduleVersion, - ...Instrumentation.COMMON_ATTRIBUTES, + ...MemcachedInstrumentation.COMMON_ATTRIBUTES, }, } ); diff --git a/plugins/node/opentelemetry-instrumentation-memcached/test/index.test.ts b/plugins/node/opentelemetry-instrumentation-memcached/test/index.test.ts index 4e32af5fa6..ca6e883cac 100644 --- a/plugins/node/opentelemetry-instrumentation-memcached/test/index.test.ts +++ b/plugins/node/opentelemetry-instrumentation-memcached/test/index.test.ts @@ -30,7 +30,7 @@ import { } from '@opentelemetry/sdk-trace-base'; import type * as Memcached from 'memcached'; import * as assert from 'assert'; -import Instrumentation from '../src'; +import { MemcachedInstrumentation } from '../src'; import { DBSYSTEMVALUES_MEMCACHED, SEMATTRS_DB_SYSTEM, @@ -40,7 +40,7 @@ import { } from '@opentelemetry/semantic-conventions'; import * as util from 'util'; -const instrumentation = new Instrumentation(); +const instrumentation = new MemcachedInstrumentation(); const memoryExporter = new InMemorySpanExporter(); const CONFIG = { diff --git a/plugins/node/opentelemetry-instrumentation-mysql2/src/index.ts b/plugins/node/opentelemetry-instrumentation-mysql2/src/index.ts index 1973717afb..c26f998cff 100644 --- a/plugins/node/opentelemetry-instrumentation-mysql2/src/index.ts +++ b/plugins/node/opentelemetry-instrumentation-mysql2/src/index.ts @@ -14,9 +14,5 @@ * limitations under the License. */ -import { MySQL2Instrumentation } from './instrumentation'; - export * from './instrumentation'; -export default MySQL2Instrumentation; - export * from './types'; diff --git a/plugins/node/opentelemetry-instrumentation-nestjs-core/src/index.ts b/plugins/node/opentelemetry-instrumentation-nestjs-core/src/index.ts index 8744bbf0ae..c464af622c 100644 --- a/plugins/node/opentelemetry-instrumentation-nestjs-core/src/index.ts +++ b/plugins/node/opentelemetry-instrumentation-nestjs-core/src/index.ts @@ -14,9 +14,5 @@ * limitations under the License. */ -import { Instrumentation } from './instrumentation'; - export * from './instrumentation'; -export { Instrumentation as NestInstrumentation }; - export * from './enums/AttributeNames'; diff --git a/plugins/node/opentelemetry-instrumentation-nestjs-core/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-nestjs-core/src/instrumentation.ts index 79337e9834..5bd5c20b10 100644 --- a/plugins/node/opentelemetry-instrumentation-nestjs-core/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-nestjs-core/src/instrumentation.ts @@ -35,10 +35,10 @@ import { AttributeNames, NestType } from './enums'; const supportedVersions = ['>=4.0.0 <11']; -export class Instrumentation extends InstrumentationBase { +export class NestInstrumentation extends InstrumentationBase { static readonly COMPONENT = '@nestjs/core'; static readonly COMMON_ATTRIBUTES = { - component: Instrumentation.COMPONENT, + component: NestInstrumentation.COMPONENT, }; constructor(config: InstrumentationConfig = {}) { @@ -47,7 +47,7 @@ export class Instrumentation extends InstrumentationBase { init() { const module = new InstrumentationNodeModuleDefinition( - Instrumentation.COMPONENT, + NestInstrumentation.COMPONENT, supportedVersions ); @@ -122,7 +122,7 @@ function createWrapNestFactoryCreate( ) { const span = tracer.startSpan('Create Nest App', { attributes: { - ...Instrumentation.COMMON_ATTRIBUTES, + ...NestInstrumentation.COMMON_ATTRIBUTES, [AttributeNames.TYPE]: NestType.APP_CREATION, [AttributeNames.VERSION]: moduleVersion, [AttributeNames.MODULE]: nestModule.name, @@ -171,7 +171,7 @@ function createWrapCreateHandler(tracer: api.Tracer, moduleVersion?: string) { ) { const span = tracer.startSpan(spanName, { attributes: { - ...Instrumentation.COMMON_ATTRIBUTES, + ...NestInstrumentation.COMMON_ATTRIBUTES, [AttributeNames.VERSION]: moduleVersion, [AttributeNames.TYPE]: NestType.REQUEST_CONTEXT, [SEMATTRS_HTTP_METHOD]: req.method, @@ -206,7 +206,7 @@ function createWrapHandler( const spanName = handler.name || 'anonymous nest handler'; const options = { attributes: { - ...Instrumentation.COMMON_ATTRIBUTES, + ...NestInstrumentation.COMMON_ATTRIBUTES, [AttributeNames.VERSION]: moduleVersion, [AttributeNames.TYPE]: NestType.REQUEST_HANDLER, [AttributeNames.CALLBACK]: handler.name, diff --git a/plugins/node/opentelemetry-instrumentation-restify/src/index.ts b/plugins/node/opentelemetry-instrumentation-restify/src/index.ts index 331bf99930..45cd8db559 100644 --- a/plugins/node/opentelemetry-instrumentation-restify/src/index.ts +++ b/plugins/node/opentelemetry-instrumentation-restify/src/index.ts @@ -14,10 +14,6 @@ * limitations under the License. */ -import { RestifyInstrumentation } from './instrumentation'; - export * from './instrumentation'; -export default RestifyInstrumentation; - export * from './enums/AttributeNames'; export * from './types'; diff --git a/plugins/node/opentelemetry-instrumentation-restify/test/restify.test.ts b/plugins/node/opentelemetry-instrumentation-restify/test/restify.test.ts index bea8b196a0..90f50071ed 100644 --- a/plugins/node/opentelemetry-instrumentation-restify/test/restify.test.ts +++ b/plugins/node/opentelemetry-instrumentation-restify/test/restify.test.ts @@ -24,7 +24,7 @@ import { SimpleSpanProcessor, } from '@opentelemetry/sdk-trace-base'; -import RestifyInstrumentation from '../src'; +import { RestifyInstrumentation } from '../src'; import * as types from '../src/internal-types'; import { RestifyRequestInfo } from '../src/types'; const plugin = new RestifyInstrumentation(); diff --git a/plugins/node/opentelemetry-instrumentation-router/src/index.ts b/plugins/node/opentelemetry-instrumentation-router/src/index.ts index b1cddbd9a5..c464af622c 100644 --- a/plugins/node/opentelemetry-instrumentation-router/src/index.ts +++ b/plugins/node/opentelemetry-instrumentation-router/src/index.ts @@ -14,9 +14,5 @@ * limitations under the License. */ -import RouterInstrumentation from './instrumentation'; - -export { RouterInstrumentation }; -export default RouterInstrumentation; - +export * from './instrumentation'; export * from './enums/AttributeNames'; diff --git a/plugins/node/opentelemetry-instrumentation-router/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-router/src/instrumentation.ts index d4f875bbc3..4e585b5c01 100644 --- a/plugins/node/opentelemetry-instrumentation-router/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-router/src/instrumentation.ts @@ -36,7 +36,7 @@ import LayerType from './enums/LayerType'; const supportedVersions = ['>=1.0.0 <2']; -export default class RouterInstrumentation extends InstrumentationBase { +export class RouterInstrumentation extends InstrumentationBase { constructor(config: InstrumentationConfig = {}) { super(PACKAGE_NAME, PACKAGE_VERSION, config); } diff --git a/plugins/node/opentelemetry-instrumentation-router/test/index.test.ts b/plugins/node/opentelemetry-instrumentation-router/test/index.test.ts index 3b16b6eb9f..4958ca77f0 100644 --- a/plugins/node/opentelemetry-instrumentation-router/test/index.test.ts +++ b/plugins/node/opentelemetry-instrumentation-router/test/index.test.ts @@ -22,9 +22,9 @@ import { SimpleSpanProcessor, } from '@opentelemetry/sdk-trace-base'; -import Instrumentation from '../src'; +import { RouterInstrumentation } from '../src'; import { InstrumentationSpan } from '../src/internal-types'; -const plugin = new Instrumentation(); +const plugin = new RouterInstrumentation(); import * as http from 'http'; import * as Router from 'router';