File tree 2 files changed +14
-0
lines changed 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ project adheres to [Semantic Versioning](http://semver.org/).
18
18
### Added
19
19
20
20
- Allow Pushgateway to now require job names for compatibility with Gravel Gateway.
21
+ - Allow ` histogram.startTime() ` to be used with exemplars.
21
22
22
23
## [ 15.0.0] - 2023-10-09
23
24
Original file line number Diff line number Diff line change @@ -498,6 +498,19 @@ export class Histogram<T extends string = string> {
498
498
*/
499
499
startTimer ( labels ?: LabelValues < T > ) : ( labels ?: LabelValues < T > ) => number ;
500
500
501
+ /**
502
+ * Start a timer with exemplar. Calling the returned function will observe the duration in
503
+ * seconds in the histogram.
504
+ * @param labels Object with label keys and values
505
+ * @param exemplarLabels Object with label keys and values for exemplars
506
+ * @return Function to invoke when timer should be stopped. The value it
507
+ * returns is the timed duration.
508
+ */
509
+ startTimer (
510
+ labels ?: LabelValues < T > ,
511
+ exemplarLabels ?: LabelValues < T > ,
512
+ ) : ( labels ?: LabelValues < T > , exemplarLabels ?: LabelValues < T > ) => number ;
513
+
501
514
/**
502
515
* Reset histogram values
503
516
*/
You can’t perform that action at this time.
0 commit comments