#[cfg(feature = "telemetry")]
pub use cognee_observability::{
BoxedTelemetryLayer, SettingsView, TelemetryGuard, TelemetryInitError, already_instrumented,
init_telemetry, is_tracing_enabled, parse_otlp_headers,
};
#[cfg(feature = "telemetry")]
use crate::config::Settings;
#[cfg(feature = "telemetry")]
impl SettingsView for Settings {
fn tracing_enabled(&self) -> bool {
self.cognee_tracing_enabled
}
fn service_name(&self) -> &str {
&self.otel_service_name
}
fn otlp_endpoint(&self) -> &str {
&self.otel_exporter_otlp_endpoint
}
fn otlp_headers(&self) -> &str {
&self.otel_exporter_otlp_headers
}
fn otlp_protocol(&self) -> &str {
&self.otel_exporter_otlp_protocol
}
fn span_processor(&self) -> &str {
&self.otel_span_processor
}
fn traces_sampler(&self) -> &str {
&self.otel_traces_sampler
}
fn traces_sampler_arg(&self) -> &str {
&self.otel_traces_sampler_arg
}
}
pub use cognee_telemetry::{
PropertyValue, TelemetryError, UserIdRef, send_telemetry, try_send_telemetry,
};
#[cfg(feature = "telemetry")]
pub use cognee_telemetry::{env, ids, payload, sanitize};