Skip to main content

feagi_observability/
lib.rs

1// Copyright 2025 Neuraville Inc.
2// SPDX-License-Identifier: Apache-2.0
3
4//! # feagi-observability
5//!
6//! Unified observability infrastructure for FEAGI (logging, telemetry, profiling).
7//!
8//! Provides consistent observability patterns across all FEAGI crates with
9//! per-crate debug flag support.
10//!
11//! ## Features
12//! - `file-logging`: File-based log rotation (desktop only)
13//! - `metrics`: Prometheus metrics collection (desktop only)
14//! - `opentelemetry`: OpenTelemetry exporter support
15//! - `profiling`: Chrome tracing and pprof profiling support
16
17/// Crate version from Cargo.toml
18pub const VERSION: &str = env!("CARGO_PKG_VERSION");
19
20pub mod cli;
21pub mod config;
22pub mod init;
23
24// Placeholder modules - to be implemented
25pub mod context {
26    //! Correlation IDs and context propagation
27    // TODO: Implement
28}
29
30pub mod errors {
31    //! Error handling and reporting
32    // TODO: Implement
33}
34
35pub mod logging {
36    //! Structured logging with spans
37    // TODO: Implement
38}
39
40pub mod metrics {
41    //! Prometheus metrics
42    // TODO: Implement
43}
44
45pub mod profiling {
46    //! CPU/Memory profiling
47    // TODO: Implement
48}
49
50pub mod telemetry {
51    //! Unified telemetry collection
52    // TODO: Implement
53}
54
55pub mod tracing {
56    //! Distributed tracing (OpenTelemetry)
57    // TODO: Implement
58}
59
60// Re-export commonly used items
61pub use cli::*;
62pub use config::*;
63pub use init::*;
64
65/// Known FEAGI crate names for debug flags
66pub const KNOWN_CRATES: &[&str] = &[
67    "feagi-api",
68    "feagi-burst-engine",
69    "feagi-bdu",
70    "feagi-services",
71    "feagi-evo",
72    "feagi-config",
73    "feagi-io",
74    "feagi-transports",
75    "feagi-agent-sdk",
76    "feagi-state-manager",
77    "feagi-plasticity",
78    "feagi-connectome-serialization",
79];