This commit is contained in:
Vishnu Chopra
2025-08-09 19:35:48 +01:00
committed by Anton Panasenko
parent 4c9c63d725
commit bc19cf26d3
3 changed files with 236 additions and 70 deletions

View File

@@ -23,13 +23,13 @@ use codex_core::protocol::Op;
use codex_core::protocol::TaskCompleteEvent;
use codex_ollama::DEFAULT_OSS_MODEL;
use codex_protocol::config_types::SandboxMode;
use codex_telemetry as telemetry;
use event_processor_with_human_output::EventProcessorWithHumanOutput;
use event_processor_with_json_output::EventProcessorWithJsonOutput;
use tracing::debug;
use tracing::error;
use tracing::info;
use tracing_subscriber::EnvFilter;
use codex_telemetry as telemetry;
use tracing_subscriber::prelude::*;
use crate::cli::Command as ExecCommand;
@@ -171,7 +171,10 @@ pub async fn run_main(cli: Cli, codex_linux_sandbox_exe: Option<PathBuf>) -> any
// Build OTEL layer and compose into subscriber.
let telemetry = telemetry::build_layer(&telemetry::Settings {
enabled: true,
exporter: telemetry::Exporter::OtlpFile { path: PathBuf::new(), rotate_mb: Some(100) },
exporter: telemetry::Exporter::OtlpFile {
path: PathBuf::new(),
rotate_mb: Some(100),
},
service_name: "codex".to_string(),
service_version: env!("CARGO_PKG_VERSION").to_string(),
codex_home: Some(config.codex_home.clone()),
@@ -319,7 +322,8 @@ pub async fn run_main(cli: Cli, codex_linux_sandbox_exe: Option<PathBuf>) -> any
if std::io::stdin().is_terminal() {
let codex_for_eof = codex.clone();
tokio::spawn(async move {
use tokio::io::{stdin, AsyncReadExt};
use tokio::io::AsyncReadExt;
use tokio::io::stdin;
let mut stdin = stdin();
let mut buf = [0u8; 1];
loop {