duende_observe/lib.rs
1// Iron Lotus: Allow unwrap/expect in tests for clear failure messages
2#![cfg_attr(test, allow(clippy::unwrap_used, clippy::expect_used, clippy::panic))]
3
4//! # duende-observe
5//!
6//! Observability integration for the Duende daemon framework.
7//!
8//! This crate provides:
9//! - **Renacer integration**: Syscall tracing with source correlation
10//! - **ttop integration**: Real-time resource monitoring via trueno-viz collectors
11//! - **Metrics export**: Prometheus and OTLP format support
12//!
13//! ## Iron Lotus Framework
14//!
15//! - **Genchi Genbutsu** (現地現物): Direct observation via syscall tracing
16//! - **Visual Management** (目で見る管理): Real-time metrics dashboards
17//! - **Kaizen** (改善): Continuous improvement via metrics collection
18//!
19//! ## Example
20//!
21//! ```rust,ignore
22//! use duende_observe::{DaemonTracer, DaemonMonitor};
23//!
24//! // Attach tracer to daemon
25//! let mut tracer = DaemonTracer::new();
26//! tracer.attach(daemon_pid).await?;
27//!
28//! // Collect syscall trace
29//! let report = tracer.collect().await?;
30//! println!("Critical path: {:?}", report.critical_path);
31//! ```
32
33#![deny(unsafe_code)]
34#![warn(missing_docs)]
35
36pub mod error;
37pub mod monitor;
38pub mod tracer;
39
40pub use error::{ObserveError, Result};
41pub use monitor::{DaemonMonitor, DaemonSnapshot, ProcessState};
42pub use tracer::{AnomalyKind, DaemonTracer, TraceReport};