Skip to content

Commit a78fd1e

Browse files
nipunn1313Convex, Inc.
authored andcommitted
Add tracing to slow queries on usage tracking worker (#42505)
Will help debug GitOrigin-RevId: 750a5623862e0dee81986515fb6ba9b1747d8f2c
1 parent 7d06710 commit a78fd1e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

crates/common/src/knobs.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,6 +1104,14 @@ pub static BACKEND_USAGE_FIREHOSE_NAME: LazyLock<Option<String>> = LazyLock::new
11041104
}
11051105
});
11061106

1107+
/// If usage tracking worker takes longer than this, trace details to logs.
1108+
pub static USAGE_TRACKING_WORKER_SLOW_TRACE_THRESHOLD: LazyLock<Duration> = LazyLock::new(|| {
1109+
Duration::from_secs(env_config(
1110+
"USAGE_TRACKING_WORKER_SLOW_TRACE_THRESHOLD_SECONDS",
1111+
120,
1112+
))
1113+
});
1114+
11071115
/// The number of events we can accumulate in the buffer that's used to send
11081116
/// events from our business logic to our firehose client.
11091117
///

0 commit comments

Comments
 (0)