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 chain;
12mod event;
13#[doc(hidden)]
14#[allow(dead_code)] // Cross-crate candidate is consumed by the later Runtime integration slice.
15pub mod file;
16mod logger;
17mod metrics;
18mod production_fact;
19mod trace;
20
21pub use calendar_writer::{FileLoggingConfig, Rotation};
22pub use call::{ActiveCall, CallKind, CallOutcome};
23pub use chain::{
24    ActiveStage, BottleneckIdentity, CapacityDimension, CapacityObservation, ChainFieldError,
25    DatabaseDisposition, EventContext, Health, LifecycleState, LifecycleTimeoutStage,
26    OutboundAuthority, OutboundObservation, OutboundResult, RejectReason, RequestIdentity,
27    RouteIdentity, Stage, StageOutcome,
28};
29pub use event::{
30    DomainEvent, DomainEventError, DomainValue, EventLevel, MAX_DOMAIN_EVENT_NAME_BYTES,
31    MAX_DOMAIN_FIELD_NAME_BYTES, MAX_DOMAIN_FIELDS, MAX_DOMAIN_PAYLOAD_BYTES,
32    MAX_DOMAIN_STRING_BYTES,
33};
34pub use logger::{
35    FlushError, FlushFuture, InitError, Observer, ObserverConfig, OutputStage, global, init,
36    init_file,
37};
38pub use metrics::{LATENCY_BUCKET_UPPER_MS, MetricsSnapshot};
39#[doc(hidden)]
40pub use production_fact::{
41    ObservabilityProductionFactError, ObservabilityProductionFactInput,
42    ObservabilitySourceCandidateInput, ObservabilitySourceCandidateRejection,
43    VerifiedObservabilitySourceCandidateOwner, bind_observability_source_candidate,
44    observability_production_fact_input, observability_source_candidate_input,
45};
46pub use saddle_core::{CallContext, SpanId, TraceCorrelationId, TraceId};
47pub use trace::{InboundTrace, TraceIdError, trace_id_from_hex};