mirror of
https://github.com/openai/codex.git
synced 2026-11-14 06:48:26 +00:00
chore: move otel provider outside of trace module (#8968)
This commit is contained in:
1 parent
e9c548c65e
commit
16c66c37eb
6 files changed
+9
-10
No files matched your search
@@ -1,5 +1,6 @@
|
||||
pub mod config;
|
||||
pub mod metrics;
|
||||
pub mod otel_provider;
|
||||
pub mod traces;
|
||||
|
||||
mod otlp;
|
||||
@@ -11,7 +12,7 @@ use crate::metrics::Result as MetricsResult;
|
||||
use crate::metrics::timer::Timer;
|
||||
use crate::metrics::validation::validate_tag_key;
|
||||
use crate::metrics::validation::validate_tag_value;
|
||||
use crate::traces::otel_provider::OtelProvider;
|
||||
use crate::otel_provider::OtelProvider;
|
||||
use codex_protocol::ThreadId;
|
||||
use serde::Serialize;
|
||||
use std::time::Duration;
|
||||
|
||||
@@ -47,8 +47,6 @@ static TRACEPARENT_CONTEXT: OnceLock<Option<Context>> = OnceLock::new();
|
||||
thread_local! {
|
||||
static TRACEPARENT_GUARD: RefCell<Option<ContextGuard>> = const { RefCell::new(None) };
|
||||
}
|
||||
|
||||
// TODO(jif) move OtelProvider out of `traces/`
|
||||
pub struct OtelProvider {
|
||||
pub logger: Option<SdkLoggerProvider>,
|
||||
pub tracer_provider: Option<SdkTracerProvider>,
|
||||
@@ -1,2 +1 @@
|
||||
pub mod otel_manager;
|
||||
pub mod otel_provider;
|
||||
@@ -1,4 +1,4 @@
|
||||
use crate::traces::otel_provider::traceparent_context_from_env;
|
||||
use crate::otel_provider::traceparent_context_from_env;
|
||||
use chrono::SecondsFormat;
|
||||
use chrono::Utc;
|
||||
use codex_api::ResponseEvent;
|
||||
|
||||
Reference in new issue
Block a user