From 0f643bfe80b26d48a353b9781ce2255667ea4409 Mon Sep 17 00:00:00 2001 From: Daniel Li Date: Mon, 29 Jan 2024 10:01:34 +0000 Subject: [PATCH] chore: remove 'performance' from gauge name --- .../node/instrumentation-perf-hooks/src/instrumentation.ts | 2 +- .../test/event_loop_utilization.test.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/node/instrumentation-perf-hooks/src/instrumentation.ts b/plugins/node/instrumentation-perf-hooks/src/instrumentation.ts index a414fe4cd0..bc67492a34 100644 --- a/plugins/node/instrumentation-perf-hooks/src/instrumentation.ts +++ b/plugins/node/instrumentation-perf-hooks/src/instrumentation.ts @@ -53,7 +53,7 @@ export class PerfHooksInstrumentation extends InstrumentationBase { // the Meter (result of @opentelemetry/api's getMeter) is available as this.meter within this method override _updateMetricInstruments() { this.meter - .createObservableGauge('nodejs.performance.event_loop.utilization', { + .createObservableGauge('nodejs.event_loop.utilization', { description: 'Event loop utilization', unit: '1', }) diff --git a/plugins/node/instrumentation-perf-hooks/test/event_loop_utilization.test.ts b/plugins/node/instrumentation-perf-hooks/test/event_loop_utilization.test.ts index c05dbf342b..ff9726a725 100644 --- a/plugins/node/instrumentation-perf-hooks/test/event_loop_utilization.test.ts +++ b/plugins/node/instrumentation-perf-hooks/test/event_loop_utilization.test.ts @@ -40,7 +40,7 @@ const instrumentation = new PerfHooksInstrumentation({ instrumentation.setMeterProvider(meterProvider); -describe('nodejs.performance.event_loop.utilization', () => { +describe('nodejs.event_loop.utilization', () => { before(async () => { instrumentation.enable(); }); @@ -78,7 +78,7 @@ describe('nodejs.performance.event_loop.utilization', () => { assert.strictEqual(metrics[0].dataPoints[0].value < 1, true); assert.strictEqual( metrics[0].descriptor.name, - 'nodejs.performance.event_loop.utilization' + 'nodejs.event_loop.utilization' ); assert.strictEqual( metrics[0].descriptor.description,