Add telemetry events for loading extensions (#9793)

* Store extensions versions' wasm API version in the database
* Share a common struct for extension API responses between collab and
client
* Add wasm API version and schema version to extension API responses

Release Notes:

- N/A

Co-authored-by: Marshall <marshall@zed.dev>
This commit is contained in:
Max Brunsfeld 2024-03-25 14:30:48 -07:00 committed by GitHub
parent 9b62e461ed
commit 5adc51f113
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 531 additions and 306 deletions

View file

@ -1,6 +1,5 @@
use std::fmt::Display;
use serde::{Deserialize, Serialize};
use std::{fmt::Display, sync::Arc};
use util::SemanticVersion;
#[derive(Serialize, Deserialize, Debug)]
@ -61,6 +60,7 @@ pub enum Event {
Memory(MemoryEvent),
App(AppEvent),
Setting(SettingEvent),
Extension(ExtensionEvent),
Edit(EditEvent),
Action(ActionEvent),
}
@ -125,6 +125,12 @@ pub struct SettingEvent {
pub value: String,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ExtensionEvent {
pub extension_id: Arc<str>,
pub version: Arc<str>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct AppEvent {
pub operation: String,