Skip to main content

Crate saddle_observability

Crate saddle_observability 

Source
Expand description

Saddle structured logging and trace correlation.

The V1 scope is Log and Trace only; the broader name does not imply Metrics or monitoring-platform delivery in V1. Framework components create an Observer once and use Observer::start_external_call and Observer::start_child_call around their async work. Records are queued without waiting for the output writer.

Structs§

ActiveCall
An in-flight framework boundary.
CallContext
The minimum identity propagated through Service, DB and Observability in V1.
DomainEvent
An explicit business event associated with the current call context.
FlushFuture
A non-blocking future returned by flush and shutdown lifecycle operations.
Observer
Process-level structured logger and trace correlator.
ObserverConfig
Configuration for the bounded non-blocking logger.
SpanId
TraceId

Enums§

CallKind
Framework boundaries that automatically produce start and finish records.
CallOutcome
Stable completion classification for framework call logs.
DomainEventError
Validation failures for bounded V1 domain events.
DomainValue
Scalar domain data that is safe and intentional to include in a log event.
EventLevel
Stable severity values emitted by Saddle’s JSON logger.
FlushError
A flush or managed shutdown result that is safe to expose to framework code.
InboundTrace
How an external request’s trace identifier was selected.
InitError
OutputStage
The output operation whose first failure made log delivery unhealthy.
TraceIdError
The reason a textual trace identifier cannot be inherited.

Constants§

MAX_DOMAIN_EVENT_NAME_BYTES
Maximum UTF-8 byte length of a domain event name.
MAX_DOMAIN_FIELDS
Maximum number of scalar fields in one domain event.
MAX_DOMAIN_FIELD_NAME_BYTES
Maximum UTF-8 byte length of a domain field name.
MAX_DOMAIN_PAYLOAD_BYTES
Maximum encoded JSON bytes for the name and fields of one domain event.
MAX_DOMAIN_STRING_BYTES
Maximum UTF-8 byte length of one domain string value.

Functions§

global
Returns the initialized process observer, if application startup installed it.
init
Initializes stdout logging once. Later calls return the first observer.
trace_id_from_hex
Parses Saddle’s fixed-width hexadecimal trace-id representation.