@@ -13,14 +13,16 @@ interface MeterInterface
1313 * @param string $name name of the instrument
1414 * @param string|null $unit unit of measure
1515 * @param string|null $description description of the instrument
16+ * @param array $advisory an optional set of recommendations
1617 * @return CounterInterface created instrument
1718 *
1819 * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#counter-creation
1920 */
2021 public function createCounter (
2122 string $ name ,
2223 ?string $ unit = null ,
23- ?string $ description = null
24+ ?string $ description = null ,
25+ array $ advisory = []
2426 ): CounterInterface ;
2527
2628 /**
@@ -29,6 +31,8 @@ public function createCounter(
2931 * @param string $name name of the instrument
3032 * @param string|null $unit unit of measure
3133 * @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
3236 * @param callable ...$callbacks responsible for reporting measurements
3337 * @return ObservableCounterInterface created instrument
3438 *
@@ -38,6 +42,7 @@ public function createObservableCounter(
3842 string $ name ,
3943 ?string $ unit = null ,
4044 ?string $ description = null ,
45+ $ advisory = [],
4146 callable ...$ callbacks
4247 ): ObservableCounterInterface ;
4348
@@ -47,14 +52,17 @@ public function createObservableCounter(
4752 * @param string $name name of the instrument
4853 * @param string|null $unit unit of measure
4954 * @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>
5057 * @return HistogramInterface created instrument
5158 *
5259 * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#histogram-creation
5360 */
5461 public function createHistogram (
5562 string $ name ,
5663 ?string $ unit = null ,
57- ?string $ description = null
64+ ?string $ description = null ,
65+ array $ advisory = []
5866 ): HistogramInterface ;
5967
6068 /**
@@ -63,6 +71,8 @@ public function createHistogram(
6371 * @param string $name name of the instrument
6472 * @param string|null $unit unit of measure
6573 * @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
6676 * @param callable ...$callbacks responsible for reporting measurements
6777 * @return ObservableGaugeInterface created instrument
6878 *
@@ -72,6 +82,7 @@ public function createObservableGauge(
7282 string $ name ,
7383 ?string $ unit = null ,
7484 ?string $ description = null ,
85+ $ advisory = [],
7586 callable ...$ callbacks
7687 ): ObservableGaugeInterface ;
7788
@@ -81,14 +92,16 @@ public function createObservableGauge(
8192 * @param string $name name of the instrument
8293 * @param string|null $unit unit of measure
8394 * @param string|null $description description of the instrument
95+ * @param array $advisory an optional set of recommendations
8496 * @return UpDownCounterInterface created instrument
8597 *
8698 * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#updowncounter-creation
8799 */
88100 public function createUpDownCounter (
89101 string $ name ,
90102 ?string $ unit = null ,
91- ?string $ description = null
103+ ?string $ description = null ,
104+ array $ advisory = []
92105 ): UpDownCounterInterface ;
93106
94107 /**
@@ -97,6 +110,8 @@ public function createUpDownCounter(
97110 * @param string $name name of the instrument
98111 * @param string|null $unit unit of measure
99112 * @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
100115 * @param callable ...$callbacks responsible for reporting measurements
101116 * @return ObservableUpDownCounterInterface created instrument
102117 *
@@ -106,6 +121,7 @@ public function createObservableUpDownCounter(
106121 string $ name ,
107122 ?string $ unit = null ,
108123 ?string $ description = null ,
124+ $ advisory = [],
109125 callable ...$ callbacks
110126 ): ObservableUpDownCounterInterface ;
111127}
0 commit comments