telemetry: Reduce the amount of telemetry events fired (#36060)

1. Extension loaded events are now condensed into a single event with a
Vec of (extension_id, extension_version) called id_and_versions.
2. Editor Saved & AutoSaved are merged into a singular event with a type
field that is either "manual" or "autosave”.
3. Editor Edited event will only fire once every 10 minutes now.
4. Editor Closed event is fired when an editor item (tab) is removed
from a pane



cc: @katie-z-geer 

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
This commit is contained in:
Anthony Eid 2025-08-12 15:56:27 -04:00 committed by GitHub
parent 628b1058be
commit 255bb0a3f8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 110 additions and 43 deletions

View file

@ -1118,15 +1118,17 @@ impl ExtensionStore {
extensions_to_unload.len() - reload_count
);
for extension_id in &extensions_to_load {
if let Some(extension) = new_index.extensions.get(extension_id) {
telemetry::event!(
"Extension Loaded",
extension_id,
version = extension.manifest.version
);
}
}
let extension_ids = extensions_to_load
.iter()
.filter_map(|id| {
Some((
id.clone(),
new_index.extensions.get(id)?.manifest.version.clone(),
))
})
.collect::<Vec<_>>();
telemetry::event!("Extensions Loaded", id_and_versions = extension_ids);
let themes_to_remove = old_index
.themes