Skip to main content

Crate sc_observability

Crate sc_observability 

Source
Expand description

Lightweight structured logging for the sc-observability workspace.

This crate owns logging-only concerns: logger configuration, built-in file and console sinks, sink fan-out, filtering, redaction, and logging health. It intentionally avoids typed observation routing and OTLP transport logic.

Modules§

constants
Crate-local constants for sc-observability.
error_codes
Stable ErrorCode registry for sc-observability.

Structs§

ActionName
Validated stable action name for log and span events.
ConsoleSink
Built-in sink that renders log events to a configured output stream (stdout or stderr).
ErrorCode
Stable machine-readable error code used across diagnostics and error types.
EventError
Event validation or lifecycle error returned during emit paths.
JsonlFileSink
Built-in JSONL file sink with rotation and retention handling.
JsonlLogReader
Independent JSONL reader for historical query and follow operations.
LogEvent
Structured log record emitted by the logging and routing layers.
LogFollowSession
Tail-style follow session over the active JSONL log and its rotation set.
LogQuery
Shared historical/follow query contract used by the logging reader/runtime layers.
LogSnapshot
Stable synchronous result contract returned by query/follow polling surfaces.
Logger
Lightweight structured logging runtime with built-in query and follow support.
LoggerBuilder
Construction-time logger builder that owns sink registration.
LoggerConfig
Public configuration for the lightweight logging runtime.
LoggingHealthReport
Aggregate logging health report.
OutcomeLabel
Validated stable outcome label for event results.
ProcessIdentity
Caller-resolved process identity attached to observations and log events.
RedactionPolicy
Redaction settings applied to log events before sink fan-out.
RetentionPolicy
Retention limits for rotated JSONL files owned by the built-in file sink.
RotationPolicy
Rotation limits for the built-in JSONL file sink.
SchemaVersion
Validated schema version label for shared envelopes and log records.
ServiceName
Validated service name carried in logs and telemetry.
SinkHealth
Health summary for one concrete logging sink.
SinkRegistration
Construction-time sink registration pairing one sink with an optional filter.
TargetCategory
Validated stable target category for log events.
Timestamp
Canonical UTC timestamp type used across the workspace.

Enums§

Level
Canonical event/log severity level.
LoggingHealthState
Top-level health state for the lightweight logging layer.
SinkHealthState
Health state for an individual log sink.

Constants§

OBSERVATION_ENVELOPE_VERSION
Current version string for the observation envelope contract.

Traits§

LogFilter
Filters events before they are written to one registered sink.
LogSink
One concrete event sink used by the logger runtime.
Redactor
Redacts one key/value pair before an event reaches registered sinks.