Skip to content

Commit c40e316

Browse files
committed
Update
1 parent dc6ed6f commit c40e316

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

package-lock.json

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/esbuild-plugin-node/src/config/main.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,19 @@
1616

1717
import {
1818
Instrumentation,
19-
InstrumentationBase,
19+
InstrumentationModuleDefinition,
2020
} from '@opentelemetry/instrumentation';
2121

2222
import { EsbuildInstrumentationConfigMap } from '../types';
2323
import { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentations-node';
2424

25-
function getModuleDefinitions(instrumentation: Instrumentation) {
26-
if (instrumentation instanceof InstrumentationBase) {
25+
function getModuleDefinitions(
26+
instrumentation: Instrumentation
27+
): InstrumentationModuleDefinition<any>[] {
28+
if (
29+
'getModuleDefinitions' in instrumentation &&
30+
typeof instrumentation.getModuleDefinitions === 'function'
31+
) {
2732
return instrumentation.getModuleDefinitions() ?? [];
2833
}
2934

0 commit comments

Comments
 (0)