fix(otel): emit trace_output as span attribute instead of event (#9255)
Signed-off-by: Douwe Osinga <douwe@squareup.com> Co-authored-by: Douwe Osinga <douwe@squareup.com>
This commit is contained in:
@@ -1633,7 +1633,7 @@ impl Agent {
|
||||
.count();
|
||||
|
||||
let working_dir = session.working_dir.clone();
|
||||
let reply_stream_span = tracing::info_span!(target: "goose::agents::agent", "reply_stream", session.id = %session_config.id);
|
||||
let reply_stream_span = tracing::info_span!(target: "goose::agents::agent", "reply_stream", trace_output = tracing::field::Empty, session.id = %session_config.id);
|
||||
let inner = Box::pin(async_stream::try_stream! {
|
||||
let mut turns_taken = 0u32;
|
||||
let max_turns = session_config.max_turns.unwrap_or_else(|| {
|
||||
@@ -2218,7 +2218,7 @@ impl Agent {
|
||||
}
|
||||
|
||||
if !last_assistant_text.is_empty() {
|
||||
tracing::info!(target: "goose::agents::agent", trace_output = last_assistant_text.as_str());
|
||||
tracing::Span::current().record("trace_output", last_assistant_text.as_str());
|
||||
}
|
||||
|
||||
self.emit_hook(crate::hooks::HookEvent::Stop, &session_config.id).await;
|
||||
|
||||
Reference in New Issue
Block a user