@@ -13,14 +13,16 @@ interface MeterInterface
13
13
* @param string $name name of the instrument
14
14
* @param string|null $unit unit of measure
15
15
* @param string|null $description description of the instrument
16
+ * @param array $advisory an optional set of recommendations
16
17
* @return CounterInterface created instrument
17
18
*
18
19
* @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#counter-creation
19
20
*/
20
21
public function createCounter (
21
22
string $ name ,
22
23
?string $ unit = null ,
23
- ?string $ description = null
24
+ ?string $ description = null ,
25
+ array $ advisory = []
24
26
): CounterInterface ;
25
27
26
28
/**
@@ -29,6 +31,8 @@ public function createCounter(
29
31
* @param string $name name of the instrument
30
32
* @param string|null $unit unit of measure
31
33
* @param string|null $description description of the instrument
34
+ * @param array|callable $advisory an optional set of recommendations, or
35
+ * deprecated: the first callback to report measurements
32
36
* @param callable ...$callbacks responsible for reporting measurements
33
37
* @return ObservableCounterInterface created instrument
34
38
*
@@ -38,6 +42,7 @@ public function createObservableCounter(
38
42
string $ name ,
39
43
?string $ unit = null ,
40
44
?string $ description = null ,
45
+ $ advisory = [],
41
46
callable ...$ callbacks
42
47
): ObservableCounterInterface ;
43
48
@@ -47,14 +52,17 @@ public function createObservableCounter(
47
52
* @param string $name name of the instrument
48
53
* @param string|null $unit unit of measure
49
54
* @param string|null $description description of the instrument
55
+ * @param array $advisory an optional set of recommendations, e.g.
56
+ * <code>['ExplicitBucketBoundaries' => [0.25, 0.5, 1, 5]]</code>
50
57
* @return HistogramInterface created instrument
51
58
*
52
59
* @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#histogram-creation
53
60
*/
54
61
public function createHistogram (
55
62
string $ name ,
56
63
?string $ unit = null ,
57
- ?string $ description = null
64
+ ?string $ description = null ,
65
+ array $ advisory = []
58
66
): HistogramInterface ;
59
67
60
68
/**
@@ -63,6 +71,8 @@ public function createHistogram(
63
71
* @param string $name name of the instrument
64
72
* @param string|null $unit unit of measure
65
73
* @param string|null $description description of the instrument
74
+ * @param array|callable $advisory an optional set of recommendations, or
75
+ * deprecated: the first callback to report measurements
66
76
* @param callable ...$callbacks responsible for reporting measurements
67
77
* @return ObservableGaugeInterface created instrument
68
78
*
@@ -72,6 +82,7 @@ public function createObservableGauge(
72
82
string $ name ,
73
83
?string $ unit = null ,
74
84
?string $ description = null ,
85
+ $ advisory = [],
75
86
callable ...$ callbacks
76
87
): ObservableGaugeInterface ;
77
88
@@ -81,14 +92,16 @@ public function createObservableGauge(
81
92
* @param string $name name of the instrument
82
93
* @param string|null $unit unit of measure
83
94
* @param string|null $description description of the instrument
95
+ * @param array $advisory an optional set of recommendations
84
96
* @return UpDownCounterInterface created instrument
85
97
*
86
98
* @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#updowncounter-creation
87
99
*/
88
100
public function createUpDownCounter (
89
101
string $ name ,
90
102
?string $ unit = null ,
91
- ?string $ description = null
103
+ ?string $ description = null ,
104
+ array $ advisory = []
92
105
): UpDownCounterInterface ;
93
106
94
107
/**
@@ -97,6 +110,8 @@ public function createUpDownCounter(
97
110
* @param string $name name of the instrument
98
111
* @param string|null $unit unit of measure
99
112
* @param string|null $description description of the instrument
113
+ * @param array|callable $advisory an optional set of recommendations, or
114
+ * deprecated: the first callback to report measurements
100
115
* @param callable ...$callbacks responsible for reporting measurements
101
116
* @return ObservableUpDownCounterInterface created instrument
102
117
*
@@ -106,6 +121,7 @@ public function createObservableUpDownCounter(
106
121
string $ name ,
107
122
?string $ unit = null ,
108
123
?string $ description = null ,
124
+ $ advisory = [],
109
125
callable ...$ callbacks
110
126
): ObservableUpDownCounterInterface ;
111
127
}
0 commit comments