add basic crash analytics and very light telemetry to dioxus-cli (#4224)

* wip

* wip: basic telemetry

* fix merge

* keep errors for telemetry

* fix upload when queued events are empty

* add per session id and keep track of build timing

* keep track of what commands are run

* capture panics

* keep track of panics

* better path stripping

* better tracing error telemetry

* only sync every week and check settings before sending any telemetry

* keep track of the args passed to commands

* anonymize commands

* more error tolerant

* wip

* wip

* wip

* merge cnflict

* other merg conflict

* migrate everything from telemetry to logging

* update docs

* wip... about to merge trace controller

* lil bit more refactor to clean up tracer

* more performant log writer

* cleanup ci detecting

* wire up to posthog

* re-uploads work

* yoink out the anon from each file

* cleanup sig

* lil bit cleaner

* dont write empty files

* wip log handler

* fmt

* cleanup logging of backtraces

* add proper backtrace support

* use stable reporter

* adhere to posthog format

* fix stacktraces

* use anyhow for capturing backtraces

* I think we're done?

* cleanup logging

* properly collect!

* move out keycode handling

* she works

* typo

* add extra fields

* fix cargo doc

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
This commit is contained in:
Jonathan KelleyandEvan Almloff authored and GitHub committed 2025-08-08 19:00:00 -07:00
1 parent a610aaefc3
commit e43bf05b69
30 files changed
+1748 -441

No files matched your search

+1 -1
View File
@@ -288,7 +288,7 @@ pub struct CustomSignCommandSettings {
pub args: Vec<String>,
}
#[derive(Clone, Copy, Debug, clap::ValueEnum)]
#[derive(Clone, Copy, Debug, clap::ValueEnum, Serialize)]
pub(crate) enum PackageType {
/// The macOS application bundle (.app).
#[clap(name = "macos")]
+9
View File
@@ -11,3 +11,12 @@ pub(crate) struct AddressArguments {
#[clap(long)]
pub(crate) addr: Option<std::net::IpAddr>,
}
impl crate::Anonymized for AddressArguments {
fn anonymized(&self) -> serde_json::Value {
serde_json::json!({
"port": self.port,
"addr": self.addr.map(|addr| if addr.is_loopback() { "loopback" } else if addr.is_unspecified() { "unspecified" } else { "other" }),
})
}
}