Closed cole-h closed 2 years ago
Looking good:
2022-09-08T12:30:08.850696Z TRACE riff::telemetry: Sending telemetry data to https://registry.riff.determinate.systems/telemetry, data: Telemetry { distinct_id: Some(Secret([REDACTED riff::telemetry::DistinctId])), system_os: "linux", system_arch: "x86_64", os_release_name: Some("NixOS"), os_release_version_id: Some("22.11"), riff_version: "1.0.0", nix_version: Some("nix (Nix) 2.10.3"), is_tty: true, subcommand: None, detected_languages: {}, in_ci: false }
Note I also verified that the telemetry events still contain the distinct ID as expected. Nicely done!
We do this by using the secrecy crate to ensure the
fmt::Debug
representation of the Telemetry struct redacts the distinct_id field.Because
Uuid
is a foreign type, I had to make a newtype around it in order to implement the marker traits that allowssecrecy::Secret
to do its job.