File tree 3 files changed +6
-9
lines changed
3 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -12,10 +12,11 @@ type Counter interface {
12
12
Add (float64 ) // Only positive
13
13
}
14
14
15
+ type Labels map [string ]string
16
+
15
17
// CounterVec is a counter with tags.
16
18
type CounterVec interface {
17
- IncWithLabelValues (labels ... string )
18
- AddWithLabelValues (n float64 , labels ... string )
19
+ With (Labels ) Counter
19
20
}
20
21
21
22
// Gauge is a metric that can be increased and decreased.
Original file line number Diff line number Diff line change @@ -27,12 +27,8 @@ func (g *noop) Observe(v float64) {
27
27
// Noop
28
28
}
29
29
30
- func (g * noop ) IncWithLabelValues (labels ... string ) {
31
- // Noop
32
- }
33
-
34
- func (g * noop ) AddWithLabelValues (v float64 , labels ... string ) {
35
- // Noop
30
+ func (g * noop ) With (labels Labels ) Counter {
31
+ return g
36
32
}
37
33
38
34
// Creator functions
Original file line number Diff line number Diff line change 1
1
{
2
- "version" : " v0.1 .0"
2
+ "version" : " v0.2 .0"
3
3
}
You can’t perform that action at this time.
0 commit comments