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
//! External Integrations
//!
//! This module provides integrations with external LLMOps platforms and services.
//!
//! # Architecture
//!
//! All integrations implement the `Integration` trait from `crate::core::traits::integration`.
//! The `IntegrationManager` handles registration and dispatching of events to all integrations.
//!
//! # Available Integrations
//!
//! ## Langfuse
//!
//! Open-source LLMOps platform for tracing, evaluation, and analytics.
//!
//! ```rust,ignore
//! use litellm_rs::core::integrations::langfuse::{LangfuseLogger, LlmRequest};
//!
//! let logger = LangfuseLogger::from_env()?;
//! logger.on_llm_start(LlmRequest::new("req-id", "gpt-4"));
//! ```
//!
//! See the [`langfuse`] module for detailed documentation.
//!
//! ## Observability
//!
//! Prometheus and OpenTelemetry integrations for metrics and tracing.
//!
//! ```rust,ignore
//! use litellm_rs::core::integrations::observability::{PrometheusIntegration, OpenTelemetryIntegration};
//!
//! let prometheus = PrometheusIntegration::with_defaults();
//! let otel = OpenTelemetryIntegration::with_defaults();
//! ```
//!
//! # Usage with IntegrationManager
//!
//! ```rust,ignore
//! use litellm_rs::core::integrations::{IntegrationManager, IntegrationManagerConfig};
//! use litellm_rs::core::traits::integration::LlmStartEvent;
//!
//! let manager = IntegrationManager::with_defaults();
//! manager.register(my_integration).await;
//!
//! // Dispatch events to all integrations
//! let event = LlmStartEvent::new("req-1", "gpt-4");
//! manager.on_llm_start(&event).await?;
//! ```
// Re-export commonly used types
pub use LangfuseTracing;
pub use ;
pub use ;
pub use ;
// Re-export trait types for convenience
pub use crate;