Skip to main content

saddle_observability/
lib.rs

1//! Saddle structured logging and trace correlation.
2//!
3//! The V1 scope is Log and Trace only; the broader name does not imply Metrics
4//! or monitoring-platform delivery in V1. Framework components create an
5//! [`Observer`] once and use [`Observer::start_external_call`] and
6//! [`Observer::start_child_call`] around their async work. Records are queued
7//! without waiting for the output writer.
8
9mod calendar_writer;
10mod call;
11mod event;
12#[doc(hidden)]
13#[allow(dead_code)] // Cross-crate candidate is consumed by the later Runtime integration slice.
14pub mod file;
15mod logger;
16mod production_fact;
17mod trace;
18
19pub use calendar_writer::{FileLoggingConfig, Rotation};
20pub use call::{ActiveCall, CallKind, CallOutcome};
21pub use event::{
22    DomainEvent, DomainEventError, DomainValue, EventLevel, MAX_DOMAIN_EVENT_NAME_BYTES,
23    MAX_DOMAIN_FIELD_NAME_BYTES, MAX_DOMAIN_FIELDS, MAX_DOMAIN_PAYLOAD_BYTES,
24    MAX_DOMAIN_STRING_BYTES,
25};
26pub use logger::{
27    FlushError, FlushFuture, InitError, Observer, ObserverConfig, OutputStage, global, init,
28    init_file,
29};
30#[doc(hidden)]
31pub use production_fact::{
32    ObservabilityProductionFactError, ObservabilityProductionFactInput,
33    ObservabilitySourceCandidateInput, ObservabilitySourceCandidateRejection,
34    VerifiedObservabilitySourceCandidateOwner, bind_observability_source_candidate,
35    observability_production_fact_input, observability_source_candidate_input,
36};
37pub use saddle_core::{CallContext, SpanId, TraceCorrelationId, TraceId};
38pub use trace::{InboundTrace, TraceIdError, trace_id_from_hex};