mirror of
https://github.com/openai/codex.git
synced 2026-11-29 00:00:54 +00:00
Count TUI launches by fullscreen transcript configuration (#46879)
## What changed Increment `codex.tui.fullscreen_transcript` after final startup configuration resolution, tagging `enabled` with the configured `tui_fullscreen_transcript` value regardless of screen policy. Emit the metric only when analytics are not explicitly disabled, a metrics exporter is configured, and a global metrics client is available. GitOrigin-RevId: 59732bc33dfa25f2fb1947ceec2e300e8e0045ca
This commit is contained in:
@@ -1841,6 +1841,18 @@ async fn run_ratatui_app(
|
||||
}
|
||||
startup_draft.apply_config(&config);
|
||||
|
||||
// Count launches that reach final config resolution, regardless of screen policy.
|
||||
if config.analytics_enabled != Some(false)
|
||||
&& config.otel.metrics_exporter != codex_config::types::OtelExporterKind::None
|
||||
&& let Some(metrics) = codex_otel::global()
|
||||
{
|
||||
let _ = metrics.counter(
|
||||
"codex.tui.fullscreen_transcript",
|
||||
/*inc*/ 1,
|
||||
&[("enabled", &config.tui_fullscreen_transcript.to_string())],
|
||||
);
|
||||
}
|
||||
|
||||
// Cloud configuration and session selection can change screen policy after first paint.
|
||||
let use_alt_screen = determine_alt_screen_mode(cli.no_alt_screen, config.tui_alternate_screen);
|
||||
let mode = crate::transcript_mode::TranscriptMode::resolve(
|
||||
|
||||
Reference in New Issue
Block a user