1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
//! Observatory integration for real-time event streaming and metrics
//!
//! This module provides event streaming capabilities for monitoring and analyzing
//! memory graph operations in real-time. Events can be published to external systems
//! like Kafka, and metrics can be collected for performance monitoring.
//!
//! # Features
//!
//! - **Event Streaming**: Publish events for all graph operations
//! - **Metrics Collection**: Track performance and usage metrics
//! - **Pluggable Publishers**: Implement custom event publishers
//! - **In-Memory Testing**: Built-in publisher for development and testing
//!
//! # Examples
//!
//! ```no_run
//! use llm_memory_graph::observatory::{ObservatoryConfig, InMemoryPublisher};
//! use llm_memory_graph::engine::AsyncMemoryGraph;
//! use llm_memory_graph::Config;
//! use std::sync::Arc;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! // Create an in-memory event publisher
//! let publisher = Arc::new(InMemoryPublisher::new());
//!
//! // Configure observatory
//! let obs_config = ObservatoryConfig::new()
//! .enabled()
//! .with_batch_size(50);
//!
//! // Create graph with observatory
//! let config = Config::default();
//! let graph = AsyncMemoryGraph::with_observatory(
//! config,
//! Some(publisher.clone()),
//! obs_config
//! ).await?;
//!
//! // Operations will now emit events
//! let session = graph.create_session().await?;
//!
//! // Check published events
//! let events = publisher.get_events().await;
//! println!("Published {} events", events.len());
//!
//! Ok(())
//! }
//! ```
pub use ObservatoryConfig;
pub use ;
pub use MemoryGraphEvent;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;