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