@@ -62,21 +62,27 @@ export enum ValueType {
62
62
* <li> count the number of 5xx errors. </li>
63
63
* <ol>
64
64
*/
65
- export interface Counter < AttributesTypes extends MetricAttributes = MetricAttributes > {
65
+ export interface Counter <
66
+ AttributesTypes extends MetricAttributes = MetricAttributes
67
+ > {
66
68
/**
67
69
* Increment value of counter by the input. Inputs must not be negative.
68
70
*/
69
71
add ( value : number , attributes ?: AttributesTypes , context ?: Context ) : void ;
70
72
}
71
73
72
- export interface UpDownCounter < AttributesTypes extends MetricAttributes = MetricAttributes > {
74
+ export interface UpDownCounter <
75
+ AttributesTypes extends MetricAttributes = MetricAttributes
76
+ > {
73
77
/**
74
78
* Increment value of counter by the input. Inputs may be negative.
75
79
*/
76
80
add ( value : number , attributes ?: AttributesTypes , context ?: Context ) : void ;
77
81
}
78
82
79
- export interface Histogram < AttributesTypes extends MetricAttributes = MetricAttributes > {
83
+ export interface Histogram <
84
+ AttributesTypes extends MetricAttributes = MetricAttributes
85
+ > {
80
86
/**
81
87
* Records a measurement. Value of the measurement must not be negative.
82
88
*/
@@ -96,16 +102,24 @@ export type MetricAttributeValue = AttributeValue;
96
102
/**
97
103
* The observable callback for Observable instruments.
98
104
*/
99
- export type ObservableCallback < AttributesTypes extends MetricAttributes = MetricAttributes > =
100
- ( observableResult : ObservableResult < AttributesTypes > ) => void | Promise < void > ;
105
+ export type ObservableCallback <
106
+ AttributesTypes extends MetricAttributes = MetricAttributes
107
+ > = (
108
+ observableResult : ObservableResult < AttributesTypes >
109
+ ) => void | Promise < void > ;
101
110
102
111
/**
103
112
* The observable callback for a batch of Observable instruments.
104
113
*/
105
- export type BatchObservableCallback < AttributesTypes extends MetricAttributes = MetricAttributes > =
106
- ( observableResult : BatchObservableResult < AttributesTypes > ) => void | Promise < void > ;
114
+ export type BatchObservableCallback <
115
+ AttributesTypes extends MetricAttributes = MetricAttributes
116
+ > = (
117
+ observableResult : BatchObservableResult < AttributesTypes >
118
+ ) => void | Promise < void > ;
107
119
108
- export interface Observable < AttributesTypes extends MetricAttributes = MetricAttributes > {
120
+ export interface Observable <
121
+ AttributesTypes extends MetricAttributes = MetricAttributes
122
+ > {
109
123
/**
110
124
* Sets up a function that will be called whenever a metric collection is initiated.
111
125
*
@@ -119,6 +133,12 @@ export interface Observable<AttributesTypes extends MetricAttributes = MetricAtt
119
133
removeCallback ( callback : ObservableCallback < AttributesTypes > ) : void ;
120
134
}
121
135
122
- export type ObservableCounter < AttributesTypes extends MetricAttributes = MetricAttributes > = Observable < AttributesTypes > ;
123
- export type ObservableUpDownCounter < AttributesTypes extends MetricAttributes = MetricAttributes > = Observable < AttributesTypes > ;
124
- export type ObservableGauge < AttributesTypes extends MetricAttributes = MetricAttributes > = Observable < AttributesTypes > ;
136
+ export type ObservableCounter <
137
+ AttributesTypes extends MetricAttributes = MetricAttributes
138
+ > = Observable < AttributesTypes > ;
139
+ export type ObservableUpDownCounter <
140
+ AttributesTypes extends MetricAttributes = MetricAttributes
141
+ > = Observable < AttributesTypes > ;
142
+ export type ObservableGauge <
143
+ AttributesTypes extends MetricAttributes = MetricAttributes
144
+ > = Observable < AttributesTypes > ;
0 commit comments