Set minimum user id length in amplitude calls
This commit is contained in:
parent
64253e4441
commit
af7c2b8b47
1 changed files with 11 additions and 1 deletions
|
@ -52,6 +52,12 @@ lazy_static! {
|
||||||
struct AmplitudeEventBatch {
|
struct AmplitudeEventBatch {
|
||||||
api_key: &'static str,
|
api_key: &'static str,
|
||||||
events: Vec<AmplitudeEvent>,
|
events: Vec<AmplitudeEvent>,
|
||||||
|
options: AmplitudeEventBatchOptions,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Serialize)]
|
||||||
|
struct AmplitudeEventBatchOptions {
|
||||||
|
min_id_length: usize,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize)]
|
#[derive(Serialize)]
|
||||||
|
@ -239,7 +245,11 @@ impl Telemetry {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let batch = AmplitudeEventBatch { api_key, events };
|
let batch = AmplitudeEventBatch {
|
||||||
|
api_key,
|
||||||
|
events,
|
||||||
|
options: AmplitudeEventBatchOptions { min_id_length: 1 },
|
||||||
|
};
|
||||||
json_bytes.clear();
|
json_bytes.clear();
|
||||||
serde_json::to_writer(&mut json_bytes, &batch)?;
|
serde_json::to_writer(&mut json_bytes, &batch)?;
|
||||||
let request =
|
let request =
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue