mirror of
https://github.com/openai/codex.git
synced 2026-11-14 06:48:26 +00:00
nit: trace span for regular task (#8053)
Logs are too spammy --------- Co-authored-by: Anton Panasenko <apanasenko@openai.com>
This commit is contained in:
1 parent
021c9a60e5
commit
d7482510b1
11 files changed
+25
-22
No files matched your search
@@ -25,7 +25,7 @@ use std::time::Instant;
|
||||
use strum_macros::Display;
|
||||
use tokio::time::error::Elapsed;
|
||||
use tracing::Span;
|
||||
use tracing::info_span;
|
||||
use tracing::trace_span;
|
||||
use tracing_opentelemetry::OpenTelemetrySpanExt;
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Display)]
|
||||
@@ -67,7 +67,7 @@ impl OtelManager {
|
||||
terminal_type: String,
|
||||
session_source: SessionSource,
|
||||
) -> OtelManager {
|
||||
let session_span = info_span!("new_session", conversation_id = %conversation_id, session_source = %session_source);
|
||||
let session_span = trace_span!("new_session", conversation_id = %conversation_id, session_source = %session_source);
|
||||
|
||||
if let Some(context) = traceparent_context_from_env() {
|
||||
session_span.set_parent(context);
|
||||
|
||||
@@ -134,7 +134,7 @@ impl OtelProvider {
|
||||
self.tracer.as_ref().map(|tracer| {
|
||||
tracing_opentelemetry::layer()
|
||||
.with_tracer(tracer.clone())
|
||||
.with_filter(LevelFilter::INFO)
|
||||
.with_filter(LevelFilter::TRACE)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user