mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-06 00:09:22 +00:00
added admin user email to telemetry (#128)
This commit is contained in:
@@ -16,7 +16,9 @@ use segment::{message::Track, Client, Message};
|
||||
use serde_json::Value;
|
||||
use std::collections::HashMap;
|
||||
|
||||
use crate::infra::config::{CONFIG, INSTANCE_ID, STREAM_SCHEMAS, TELEMETRY_CLIENT, USERS, VERSION};
|
||||
use crate::infra::config::{
|
||||
CONFIG, INSTANCE_ID, ROOT_USER, STREAM_SCHEMAS, TELEMETRY_CLIENT, USERS, VERSION,
|
||||
};
|
||||
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct Telemetry {
|
||||
@@ -114,8 +116,12 @@ pub fn get_base_info(data: &mut HashMap<String, Value>) -> HashMap<String, Value
|
||||
"host_name".to_string(),
|
||||
CONFIG.common.instance_name.clone().into(),
|
||||
);
|
||||
//TODO
|
||||
|
||||
data.insert("zo_version".to_string(), VERSION.to_owned().into());
|
||||
data.insert(
|
||||
"root_user".to_string(),
|
||||
serde_json::Value::String(ROOT_USER.get("root").unwrap().clone().email),
|
||||
);
|
||||
data.clone()
|
||||
}
|
||||
|
||||
@@ -136,7 +142,6 @@ mod test_telemetry {
|
||||
#[test]
|
||||
fn test_telemetry_new() {
|
||||
let tel = Telemetry::new();
|
||||
//println!("{:?}", tel);
|
||||
assert!(tel.base_info.len() > 0)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user