Increase telemetry queue size (#3802)

It seems like we've fixed the clickhouse errors by switching to
`async_insert`, but we're still seeing a hiccup here and there on
vercel's socket. I slowed down the collection of cpu and memory events
earlier, and this PR will slow down how frequently we send events in
general, by increasing the queue size and the debounce time.

Release Notes:

- N/A
This commit is contained in:
Joseph T. Lyons 2023-12-22 19:58:53 -05:00 committed by GitHub
commit 72b3a1dd9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -119,13 +119,13 @@ pub enum ClickhouseEvent {
const MAX_QUEUE_LEN: usize = 1;
#[cfg(not(debug_assertions))]
const MAX_QUEUE_LEN: usize = 10;
const MAX_QUEUE_LEN: usize = 50;
#[cfg(debug_assertions)]
const DEBOUNCE_INTERVAL: Duration = Duration::from_secs(1);
#[cfg(not(debug_assertions))]
const DEBOUNCE_INTERVAL: Duration = Duration::from_secs(30);
const DEBOUNCE_INTERVAL: Duration = Duration::from_secs(120);
impl Telemetry {
pub fn new(client: Arc<dyn HttpClient>, cx: &AppContext) -> Arc<Self> {

View File

@ -118,13 +118,13 @@ pub enum ClickhouseEvent {
const MAX_QUEUE_LEN: usize = 1;
#[cfg(not(debug_assertions))]
const MAX_QUEUE_LEN: usize = 10;
const MAX_QUEUE_LEN: usize = 50;
#[cfg(debug_assertions)]
const DEBOUNCE_INTERVAL: Duration = Duration::from_secs(1);
#[cfg(not(debug_assertions))]
const DEBOUNCE_INTERVAL: Duration = Duration::from_secs(30);
const DEBOUNCE_INTERVAL: Duration = Duration::from_secs(120);
impl Telemetry {
pub fn new(client: Arc<dyn HttpClient>, cx: &mut AppContext) -> Arc<Self> {