P0: config, DTOs, source traits, fakes, error, state and module stubs
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
aa9b0da962
commit
1802f97d94
22 files changed
+1736
No files matched your search
@@ -0,0 +1,3 @@
|
||||
//! Journal and docker log fan-out to OTel logs (WS-G)
|
||||
//!
|
||||
//! Placeholder created in P0 so the owning workstream only edits its own files.
|
||||
@@ -0,0 +1,3 @@
|
||||
//! Metrics poll loop and observable gauges (WS-G)
|
||||
//!
|
||||
//! Placeholder created in P0 so the owning workstream only edits its own files.
|
||||
@@ -0,0 +1,32 @@
|
||||
//! OpenTelemetry export (WS-G owns `src/telemetry/`).
|
||||
//!
|
||||
//! STUB: signatures are final. Pinned `opentelemetry-otlp` 0.33.1: use
|
||||
//! `WithExportConfig::{with_endpoint, with_protocol}` plus
|
||||
//! `WithHttpConfig::with_headers` (HashMap) or
|
||||
//! `WithTonicConfig::with_metadata` (tonic `MetadataMap`).
|
||||
|
||||
pub mod logs_export;
|
||||
pub mod metrics_export;
|
||||
|
||||
use anyhow::Result;
|
||||
use tokio::task::JoinHandle;
|
||||
|
||||
use crate::config::Config;
|
||||
use crate::state::AppState;
|
||||
|
||||
/// Flushes and shuts down providers on drop.
|
||||
pub struct TelemetryGuard {
|
||||
_private: (),
|
||||
}
|
||||
|
||||
/// Install the tracing subscriber and, when `config.otel.enabled`, the OTLP
|
||||
/// providers. Must work (stderr logging only) when OTel is disabled.
|
||||
pub fn init(_config: &Config) -> Result<TelemetryGuard> {
|
||||
todo!("WS-G G1/G2")
|
||||
}
|
||||
|
||||
/// Start the metrics poll loop and log fan-out tasks. All tasks stop on
|
||||
/// `state.shutdown`. Returns no handles when export is disabled.
|
||||
pub fn spawn_exporters(_state: AppState) -> Vec<JoinHandle<()>> {
|
||||
todo!("WS-G G3/G5")
|
||||
}
|
||||
Reference in new issue
Block a user