mirror of
https://github.com/openai/codex.git
synced 2026-05-05 05:42:33 +03:00
chore: proper client extraction (#6996)
This commit is contained in:
14
codex-rs/codex-client/src/telemetry.rs
Normal file
14
codex-rs/codex-client/src/telemetry.rs
Normal file
@@ -0,0 +1,14 @@
|
||||
use crate::error::TransportError;
|
||||
use http::StatusCode;
|
||||
use std::time::Duration;
|
||||
|
||||
/// API specific telemetry.
|
||||
pub trait RequestTelemetry: Send + Sync {
|
||||
fn on_request(
|
||||
&self,
|
||||
attempt: u64,
|
||||
status: Option<StatusCode>,
|
||||
error: Option<&TransportError>,
|
||||
duration: Duration,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user