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:
parent
6d91224882
commit
f19ab464c7
19 changed files with 1196 additions and 177 deletions
|
@ -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> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue