athena-observability 3.18.0

Portable Athena observability primitives, metrics state, and logging sinks
Documentation
//! Portable Athena observability primitives.
//!
//! This crate owns the reusable observability domain that can be shared across
//! the Athena server runtime, future adapters, and helper binaries without
//! depending on Actix, `AppState`, or route-local database registries.
//!
//! The current scope covers:
//!
//! - in-memory metrics state and classification helpers,
//! - batched client statistics writes,
//! - optional Linux NDJSON log sinks for gateway traffic,
//! - reusable gateway log contracts, redaction helpers, and trace emitters.

pub mod client_stats;
pub mod gateway_logging;
pub mod linux_gateway_file_log;
pub mod metrics;

pub use client_stats::{ClientStatsBatcher, ClientStatsBatcherConfig};
pub use gateway_logging::{
    LoggedRequest, RequestAuthLogContext, RequestCompletionLogContext, RouteRequestLogContext,
    emit_gateway_operation_trace, is_sensitive_field_name, redact_json_value,
    redact_optional_secret, redact_query_string,
};
pub use linux_gateway_file_log::{
    API_KEY_AUTH_LOG_FILENAME, GATEWAY_OPERATION_LOG_FILENAME, GATEWAY_REQUEST_LOG_FILENAME,
    LinuxGatewayFileLog,
};
pub use metrics::{
    ClusterProbeMetric, DURATION_BUCKETS_SECONDS, DurationSummary, GatewayOperationMetric,
    HttpMetric, HttpRouteMetric, ManagementMetric, MetricsState, ValueSummary, gateway_error_class,
    route_group, status_family,
};