mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 04:17:10 +02:00
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:
parent
62358bd31c
commit
91048d209d
3 changed files with 12 additions and 5 deletions
|
@ -92,7 +92,8 @@ pub fn create_app(
|
|||
let app = app.configure(|s| configure_metrics_route(s, opt.enable_metrics_route));
|
||||
|
||||
#[cfg(feature = "metrics")]
|
||||
let app = app.wrap(Condition::new(opt.enable_metrics_route, route_metrics::RouteMetrics));
|
||||
let app =
|
||||
app.wrap(middleware::Condition::new(opt.enable_metrics_route, route_metrics::RouteMetrics));
|
||||
app.wrap(
|
||||
Cors::default()
|
||||
.send_wildcard()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue