Skip to content

Commit

Permalink
fixup! feat(instrumentation): added synchronous gauge to SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
clintonb committed Mar 31, 2024
1 parent 1dbecf2 commit bbff221
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/sdk-metrics/test/Meter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import * as assert from 'assert';
import * as sinon from 'sinon';
import {
CounterInstrument,
GaugeInstrument,
HistogramInstrument,
ObservableCounterInstrument,
ObservableGaugeInstrument,
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit bbff221

Please sign in to comment.