Skip to content

Commit b1cfc47

Browse files
committed
Merge branch 'poc-esm-output' of github.com:david-luna/opentelemetry-js-contrib into poc-esm-output
2 parents 0ea9995 + 479fd18 commit b1cfc47

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

packages/instrumentation-runtime-node/src/instrumentation.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ export class RuntimeNodeInstrumentation extends InstrumentationBase<RuntimeNodeI
7373
}
7474

7575
override enable() {
76+
super.enable();
7677
if (!this._collectors) return;
7778

7879
for (const collector of this._collectors) {
@@ -81,6 +82,7 @@ export class RuntimeNodeInstrumentation extends InstrumentationBase<RuntimeNodeI
8182
}
8283

8384
override disable() {
85+
super.disable();
8486
for (const collector of this._collectors) {
8587
collector.disable();
8688
}

packages/instrumentation-runtime-node/test/instrumentation.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ describe('instrumentation', function () {
6767
const scopeMetrics = firstCollections.resourceMetrics.scopeMetrics;
6868
assert.strictEqual(scopeMetrics.length, 0);
6969

70+
assert.equal(instrumentation.isEnabled(), false);
7071
instrumentation.enable();
72+
assert.equal(instrumentation.isEnabled(), true);
7173
await new Promise(resolve => setTimeout(resolve, MEASUREMENT_INTERVAL * 5));
7274

7375
const secondCollection = await metricReader.collect();

0 commit comments

Comments
 (0)