mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-25 19:45:05 +08:00
Add prototype to analytics if any
This commit is contained in:
parent
c3a30a5a91
commit
f46cf46b8c
@ -401,12 +401,19 @@ impl Segment {
|
|||||||
if let Ok(stats) =
|
if let Ok(stats) =
|
||||||
create_all_stats(index_scheduler.into(), auth_controller, &SearchRules::default())
|
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
|
let _ = self
|
||||||
.batcher
|
.batcher
|
||||||
.push(Identify {
|
.push(Identify {
|
||||||
context: Some(json!({
|
context: Some(json!({
|
||||||
"app": {
|
"app": {
|
||||||
"version": env!("CARGO_PKG_VERSION").to_string(),
|
"version": version.to_string(),
|
||||||
},
|
},
|
||||||
})),
|
})),
|
||||||
user: self.user.clone(),
|
user: self.user.clone(),
|
||||||
|
Loading…
Reference in New Issue
Block a user