File tree 4 files changed +3
-20
lines changed
4 files changed +3
-20
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ export class NoopMeter implements Meter {
40
40
/**
41
41
* @see {@link Meter.createGauge }
42
42
*/
43
- createGauge ( _name : string , _options ?: MetricOptions ) : Histogram {
43
+ createGauge ( _name : string , _options ?: MetricOptions ) : Gauge {
44
44
return NOOP_GAUGE_METRIC ;
45
45
}
46
46
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import {
28
28
ObservableCounter ,
29
29
ObservableGauge ,
30
30
ObservableUpDownCounter ,
31
+ Gauge ,
31
32
} from '@opentelemetry/api' ;
32
33
import { millisToHrTime } from '@opentelemetry/core' ;
33
34
import { InstrumentDescriptor } from './InstrumentDescriptor' ;
@@ -36,7 +37,6 @@ import {
36
37
AsyncWritableMetricStorage ,
37
38
WritableMetricStorage ,
38
39
} from './state/WritableMetricStorage' ;
39
- import { Gauge } from './types' ;
40
40
41
41
export class SyncInstrument {
42
42
constructor (
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ import {
26
26
BatchObservableCallback ,
27
27
Observable ,
28
28
Attributes ,
29
+ Gauge ,
29
30
} from '@opentelemetry/api' ;
30
31
import {
31
32
createInstrumentDescriptor ,
@@ -41,7 +42,6 @@ import {
41
42
UpDownCounterInstrument ,
42
43
} from './Instruments' ;
43
44
import { MeterSharedState } from './state/MeterSharedState' ;
44
- import { Gauge } from './types' ;
45
45
46
46
/**
47
47
* This class implements the {@link IMeter} interface.
@@ -51,7 +51,6 @@ export class Meter implements IMeter {
51
51
52
52
/**
53
53
* Create a {@link Gauge} instrument.
54
- * @experimental
55
54
*/
56
55
createGauge < AttributesTypes extends Attributes = Attributes > (
57
56
name : string ,
Original file line number Diff line number Diff line change 13
13
* See the License for the specific language governing permissions and
14
14
* limitations under the License.
15
15
*/
16
- import { Context , MetricAttributes } from '@opentelemetry/api' ;
17
16
18
17
export type CommonReaderOptions = {
19
18
timeoutMillis ?: number ;
@@ -24,18 +23,3 @@ export type CollectionOptions = CommonReaderOptions;
24
23
export type ShutdownOptions = CommonReaderOptions ;
25
24
26
25
export type ForceFlushOptions = CommonReaderOptions ;
27
-
28
- /**
29
- * @experimental
30
- *
31
- * This is intentionally not using the API's type as it's only available from @opentelemetry/api 1.9.0 and up.
32
- * In SDK 2.0 we'll be able to bump the minimum API version and remove this workaround.
33
- */
34
- export interface Gauge <
35
- AttributesTypes extends MetricAttributes = MetricAttributes ,
36
- > {
37
- /**
38
- * Records a measurement. Value of the measurement must not be negative.
39
- */
40
- record ( value : number , attributes ?: AttributesTypes , context ?: Context ) : void ;
41
- }
You can’t perform that action at this time.
0 commit comments