Add telemetry events backend for collab (#8220)

Send telemetry to collab not zed.dev

Release Notes:

- N/A

---------

Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
This commit is contained in:
Conrad Irwin 2024-02-23 09:13:28 -07:00 committed by GitHub
parent 6d91224882
commit f19ab464c7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 1196 additions and 177 deletions

View file

@ -23,6 +23,19 @@ impl ZedHttpClient {
pub fn zed_url(&self, path: &str) -> String {
format!("{}{}", self.zed_host.lock(), path)
}
pub fn zed_api_url(&self, path: &str) -> String {
let zed_host = self.zed_host.lock().clone();
let host = match zed_host.as_ref() {
"https://zed.dev" => "https://api.zed.dev",
"https://staging.zed.dev" => "https://api-staging.zed.dev",
"http://localhost:3000" => "http://localhost:8080",
other => other,
};
format!("{}{}", host, path)
}
}
impl HttpClient for Arc<ZedHttpClient> {