Fix metrics feature

Metrics feature was relying on old references. Refactored with inspiration from the `get_stats` method in `meilisearch/src/routes/lib.rs`. `enable_metrics_routes` added to options in `segment_analytics`.

Resolves: #3469
See also: #2763
This commit is contained in:
James 2023-02-17 20:11:57 +00:00
parent 62358bd31c
commit 91048d209d
3 changed files with 12 additions and 5 deletions

View file

@ -249,6 +249,7 @@ impl From<Opt> for Infos {
// to add analytics when we add a field in the Opt.
// Thus we must not insert `..` at the end.
let Opt {
enable_metrics_route: _,
db_path,
http_addr,
master_key: _,