Add opt-out for metric reporting

co-authored-by: kay <kay@zed.dev>
This commit is contained in:
Mikayla Maki 2023-01-10 15:49:54 -08:00
parent 866f0e1344
commit 37a4de1a84
6 changed files with 76 additions and 19 deletions

View file

@ -6087,10 +6087,11 @@ impl Editor {
let extension = Path::new(file.file_name(cx))
.extension()
.and_then(|e| e.to_str());
project
.read(cx)
.client()
.report_event(name, json!({ "File Extension": extension }));
project.read(cx).client().report_event(
name,
json!({ "File Extension": extension }),
cx.global::<Settings>().telemetry(),
);
}
}
}