From bbff221cec49bd0722f8a8cc3aa9a418fff49275 Mon Sep 17 00:00:00 2001 From: Clinton Blackburn Date: Sun, 31 Mar 2024 09:47:52 -0700 Subject: [PATCH] fixup! feat(instrumentation): added synchronous gauge to SDK --- packages/sdk-metrics/test/Meter.test.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/sdk-metrics/test/Meter.test.ts b/packages/sdk-metrics/test/Meter.test.ts index e40d6aa5076..875f2028622 100644 --- a/packages/sdk-metrics/test/Meter.test.ts +++ b/packages/sdk-metrics/test/Meter.test.ts @@ -19,6 +19,7 @@ import * as assert from 'assert'; import * as sinon from 'sinon'; import { CounterInstrument, + GaugeInstrument, HistogramInstrument, ObservableCounterInstrument, ObservableGaugeInstrument, @@ -88,6 +89,18 @@ describe('Meter', () => { }); }); + describe('createGauge', () => { + testWithNames('Gauge', name => { + const meterSharedState = new MeterSharedState( + new MeterProviderSharedState(defaultResource), + defaultInstrumentationScope + ); + const meter = new Meter(meterSharedState); + const Gauge = meter.createGauge(name); + assert(Gauge instanceof GaugeInstrument); + }); + }); + describe('createObservableCounter', () => { testWithNames('ObservableCounter', name => { const meterSharedState = new MeterSharedState(