Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(observability): add tests for progress tracing export

Steven Enamakel577916268dff
diff --git a/crates/openhuman-core/src/core/observability/progress_tracing/export_tests.rs b/crates/openhuman-core/src/core/observability/progress_tracing/export_tests.rs
new file mode 100644
index 0000000000..8429643aca
--- /dev/null
+++ b/crates/openhuman-core/src/core/observability/progress_tracing/export_tests.rs
@@ -0,0 +1,23 @@
+use super::*;
+use std::collections::BTreeMap;
+use tinyagents_harness::observability::trace_export::{SpanKind, SpanStatus};
+
+#[tokio::test]
+async fn external_backend_is_skipped_before_session_lookup() {
+ let mut config = Config::default();
+ config.api_url = Some("https://external.example.invalid/openai/v1".into());
+ let spans = [TraceSpan {
+ trace_id: "thread-one:turn-one".into(),
+ span_id: "root".into(),
+ parent_span_id: None,
+ name: "agent.turn".into(),
+ kind: SpanKind::Turn,
+ start_unix_ms: 1_000,
+ end_unix_ms: Some(2_000),
+ status: SpanStatus::Ok,
+ attributes: BTreeMap::new(),
+ input: None,
+ output: None,
+ }];
+ assert!(push_spans(&config, &spans).await.is_ok());
+}