diff --git a/meilisearch/src/analytics/segment_analytics.rs b/meilisearch/src/analytics/segment_analytics.rs index 21b6696e7..566770646 100644 --- a/meilisearch/src/analytics/segment_analytics.rs +++ b/meilisearch/src/analytics/segment_analytics.rs @@ -401,12 +401,19 @@ impl Segment { if let Ok(stats) = create_all_stats(index_scheduler.into(), auth_controller, &SearchRules::default()) { + // Replace the version number with the prototype name if any. + let version = if let Some(prototype) = crate::prototype_name() { + prototype + } else { + env!("CARGO_PKG_VERSION") + }; + let _ = self .batcher .push(Identify { context: Some(json!({ "app": { - "version": env!("CARGO_PKG_VERSION").to_string(), + "version": version.to_string(), }, })), user: self.user.clone(),