From 512a359559ffba6c208bce6440fbc8772141261e 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 e40d6aa507..875f202862 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(