Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Put all analytics to one bucket #1390

Merged
merged 3 commits into from
Feb 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions crates/re_analytics/src/sink_native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ use crate::{Event, Property};
// TODO(cmc): abstract away the concept of a `Sink` behind an actual trait when comes the time to
// support more than just PostHog.

#[cfg(debug_assertions)]
const PUBLIC_POSTHOG_PROJECT_KEY: &str = "phc_XD1QbqTGdPJbzdVCbvbA9zGOG38wJFTl8RAwqMwBvTY";
#[cfg(not(debug_assertions))]
const PUBLIC_POSTHOG_PROJECT_KEY: &str = "phc_sgKidIE4WYYFSJHd8LEYY1UZqASpnfQKeMqlJfSXwqg";

// ---
Expand Down
5 changes: 4 additions & 1 deletion crates/re_viewer/src/viewer_analytics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ impl ViewerAnalytics {
let mut event = Event::update("update_metadata".into())
.with_prop("rerun_version".into(), rerun_version.to_owned())
.with_prop("target".into(), target.to_owned())
.with_prop("git_hash".into(), git_hash.to_owned());
.with_prop("git_hash".into(), git_hash.to_owned())
.with_prop("debug".into(), cfg!(debug_assertions).to_owned()) // debug-build?
.with_prop("rerun_workspace".into(), std::env::var("IS_IN_RERUN_WORKSPACE").is_ok()) // proxy for "user checked out the project and built it from source"
;

// If we happen to know the Python or Rust version used on the _host machine_, i.e. the
// machine running the viewer, then add it to the permanent user profile.
Expand Down