fix: metrics unbounded memory (#2528)
This commit is contained in:
parent
71e4268600
commit
86984e3236
|
@ -2136,9 +2136,12 @@ async fn start(
|
||||||
.unwrap();
|
.unwrap();
|
||||||
// .set_buckets_for_metric(skipped_matcher, &skipped_buckets)
|
// .set_buckets_for_metric(skipped_matcher, &skipped_buckets)
|
||||||
// .unwrap();
|
// .unwrap();
|
||||||
let prom_handle = builder
|
// See: https://github.com/metrics-rs/metrics/issues/467#issuecomment-2022755151
|
||||||
.install_recorder()
|
let (recorder, _) = builder
|
||||||
.expect("failed to install metrics recorder");
|
.build()
|
||||||
|
.expect("failed to build prometheus recorder");
|
||||||
|
let prom_handle = recorder.handle();
|
||||||
|
metrics::set_global_recorder(recorder).expect("Failed to set global recorder");
|
||||||
|
|
||||||
// Metrics descriptions
|
// Metrics descriptions
|
||||||
metrics::describe_counter!("tgi_request_success", "Number of successful requests");
|
metrics::describe_counter!("tgi_request_success", "Number of successful requests");
|
||||||
|
|
Loading…
Reference in New Issue