//! Production observability support built on `tracing`.
//!
//! This module intentionally uses one shared ordered filter for all log outputs.
//! Local file logging and remote OpenTelemetry logging are output concerns; they
//! do not own separate filter chains.

pub mod config;
mod config_file;
pub mod filter;
pub mod init;
mod js_filter_export;
mod local;
mod metrics;
mod otlp_http;
#[cfg(feature = "pi-config")]
mod pi_config_adapter;
pub mod reload;
mod remote;
mod trace;

pub use config::{
    DynamicLogConfig, FieldRuleConfig, FieldRuleOp, FuzzyMatchType, FuzzyRuleConfig, FuzzyRuleKind,
    LogConfig, LogConsoleConfig, LogFilterConfig, LogFilterOverrideConfig, LogFormat,
    LogLocalConfig, LogRemoteConfig, MetricsConfig, ObservabilityConfig, OtlpProtocol, TraceConfig,
};
pub use config_file::{
    observability_config_from_rust_log, reload_observability_filters,
    validate_observability_config, validate_observability_config_path,
};
pub use filter::{FieldRule, FuzzyRule, SharedOrderedFilter};
pub use init::{init_observability, init_observability_from_optional_path, ObservabilityGuards};
pub use js_filter_export::{
    current_js_log_filter_revision, current_js_trace_filter_revision,
    export_js_log_filter_json, export_js_log_filter_snapshot, export_js_trace_filter_json,
    export_js_trace_filter_snapshot, js_trace_enabled, JsLogFilterScope, JsLogFilterSnapshot,
    JsTraceFilterSnapshot, JS_LOG_FILTER_SCHEMA_VERSION, JS_TRACE_FILTER_SCHEMA_VERSION,
};
#[cfg(feature = "pi-config")]
pub use pi_config_adapter::{
    init_observability_from_pi_config, observability_config_from_pi_config,
    reload_observability_filters_from_pi_config,
};
pub use reload::{FilterReloadHandle, ObservabilityReloadHandle};
