Skip to main content

obz_core/
model.rs

1//! Unified data models for metrics, logs, and traces.
2//!
3//! All backend responses are normalized to these models before output.
4//! The models are designed for AI Agent consumption (compact, deterministic,
5//! pre-computed statistics).
6
7pub mod error;
8pub mod log;
9pub mod metric;
10pub mod response;
11pub mod trace;
12
13pub use error::{ErrorCategory, ErrorCode, ErrorDetail, ObzError};
14pub use log::{LogEntry, Severity};
15pub use metric::{DataPoint, MetricInfoDetail, MetricSeries, MetricType, SeriesStats};
16pub use response::{
17    LabelValuesData, LogSearchData, MetricInfoData, MetricQueryData, QueryMetadata, Response,
18    ResponseStatus, ScalarData, SeriesListData, StringListData, TimeRange, RESULT_TYPE_LABEL_LIST,
19    RESULT_TYPE_LABEL_VALUES, RESULT_TYPE_LOG_ENTRIES, RESULT_TYPE_METRIC_INFO,
20    RESULT_TYPE_METRIC_LIST, RESULT_TYPE_SERIES, RESULT_TYPE_SPANS, RESULT_TYPE_TRACE_DETAIL,
21};
22pub use trace::{Span, SpanEvent, SpanKind, SpanStatus, TraceDetail};