Merge pull request #53 from DeterminateSystems/correlation

Use detsys_correlation if it is set
This commit is contained in:
Graham Christensen 2024-04-11 22:11:18 -04:00 committed by GitHub
commit b64bf3f4e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -45,7 +45,9 @@ impl Metric {
impl TelemetryReport {
pub fn new() -> TelemetryReport {
TelemetryReport {
distinct_id: calculate_opaque_id().ok(),
distinct_id: env::var("DETSYS_CORRELATION")
.ok()
.or_else(|| calculate_opaque_id().ok()),
version: env!("CARGO_PKG_VERSION").to_string(),
is_ci: is_ci::cached(),