-
Notifications
You must be signed in to change notification settings - Fork 7.5k
feat: add analytics config setting #8350
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -353,6 +353,10 @@ pub struct Config { | |
| /// or placeholder replacement will occur for fast keypress bursts. | ||
| pub disable_paste_burst: bool, | ||
|
|
||
| /// When `false`, disables analytics across Codex product surfaces in this machine. | ||
| /// Defaults to `true`. | ||
| pub analytics: bool, | ||
|
|
||
| /// OTEL configuration (exporter type, endpoint, headers, etc.). | ||
| pub otel: crate::config::types::OtelConfig, | ||
| } | ||
|
|
@@ -813,6 +817,10 @@ pub struct ConfigToml { | |
| /// or placeholder replacement will occur for fast keypress bursts. | ||
| pub disable_paste_burst: Option<bool>, | ||
|
|
||
| /// When `false`, disables analytics across Codex product surfaces in this machine. | ||
| /// Defaults to `true`. | ||
| pub analytics: Option<crate::config::types::AnalyticsConfigToml>, | ||
|
|
||
| /// OTEL configuration. | ||
| pub otel: Option<crate::config::types::OtelConfigToml>, | ||
|
|
||
|
|
@@ -1390,6 +1398,12 @@ impl Config { | |
| notices: cfg.notice.unwrap_or_default(), | ||
| check_for_update_on_startup, | ||
| disable_paste_burst: cfg.disable_paste_burst.unwrap_or(false), | ||
| analytics: config_profile | ||
| .analytics | ||
| .as_ref() | ||
| .and_then(|a| a.enabled) | ||
| .or(cfg.analytics.as_ref().and_then(|a| a.enabled)) | ||
| .unwrap_or(true), | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess this has been validated with legal right?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yup, I'll ping you in Slack with more details |
||
| tui_notifications: cfg | ||
| .tui | ||
| .as_ref() | ||
|
|
@@ -3039,6 +3053,9 @@ approval_policy = "untrusted" | |
| # `ConfigOverrides`. | ||
| profile = "gpt3" | ||
|
|
||
| [analytics] | ||
| enabled = true | ||
|
|
||
| [model_providers.openai-chat-completions] | ||
| name = "OpenAI using Chat Completions" | ||
| base_url = "https://api.openai.com/v1" | ||
|
|
@@ -3064,6 +3081,9 @@ model = "o3" | |
| model_provider = "openai" | ||
| approval_policy = "on-failure" | ||
|
|
||
| [profiles.zdr.analytics] | ||
| enabled = false | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add a test to make sure this work?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's there! see |
||
|
|
||
| [profiles.gpt5] | ||
| model = "gpt-5.1" | ||
| model_provider = "openai" | ||
|
|
@@ -3204,6 +3224,7 @@ model_verbosity = "high" | |
| tui_notifications: Default::default(), | ||
| animations: true, | ||
| show_tooltips: true, | ||
| analytics: true, | ||
| tui_scroll_events_per_tick: None, | ||
| tui_scroll_wheel_lines: None, | ||
| tui_scroll_trackpad_lines: None, | ||
|
|
@@ -3287,6 +3308,7 @@ model_verbosity = "high" | |
| tui_notifications: Default::default(), | ||
| animations: true, | ||
| show_tooltips: true, | ||
| analytics: true, | ||
| tui_scroll_events_per_tick: None, | ||
| tui_scroll_wheel_lines: None, | ||
| tui_scroll_trackpad_lines: None, | ||
|
|
@@ -3385,6 +3407,7 @@ model_verbosity = "high" | |
| tui_notifications: Default::default(), | ||
| animations: true, | ||
| show_tooltips: true, | ||
| analytics: false, | ||
| tui_scroll_events_per_tick: None, | ||
| tui_scroll_wheel_lines: None, | ||
| tui_scroll_trackpad_lines: None, | ||
|
|
@@ -3469,6 +3492,7 @@ model_verbosity = "high" | |
| tui_notifications: Default::default(), | ||
| animations: true, | ||
| show_tooltips: true, | ||
| analytics: true, | ||
| tui_scroll_events_per_tick: None, | ||
| tui_scroll_wheel_lines: None, | ||
| tui_scroll_trackpad_lines: None, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.