pub struct TelemetryConfig { /* private fields */ }Expand description
Builder for telemetry configuration.
Construct via init().
Implementations§
Source§impl TelemetryConfig
impl TelemetryConfig
Sourcepub fn with_store(self, path: impl Into<String>) -> Self
pub fn with_store(self, path: impl Into<String>) -> Self
Set the SQLite database file path.
If not called, an in-memory database is used.
Sourcepub fn with_langfuse(self, config: LangfuseConfig) -> Self
pub fn with_langfuse(self, config: LangfuseConfig) -> Self
Enable Langfuse cloud export with explicit credentials.
Sourcepub fn with_langfuse_from_env(self) -> Self
pub fn with_langfuse_from_env(self) -> Self
Enable Langfuse cloud export by reading credentials from environment.
Reads:
LANGFUSE_PUBLIC_KEYLANGFUSE_SECRET_KEYLANGFUSE_BASE_URL(defaults tohttps://cloud.langfuse.com)
If any required variable is missing, Langfuse export is silently skipped.
Sourcepub const fn with_dashboard(self, port: u16) -> Self
pub const fn with_dashboard(self, port: u16) -> Self
Enable the embedded web dashboard on the given port.
Sourcepub const fn with_bind_addr(self, ip: [u8; 4]) -> Self
pub const fn with_bind_addr(self, ip: [u8; 4]) -> Self
Set the bind address for the dashboard server.
Use [0, 0, 0, 0] for public access. Default is [127, 0, 0, 1].
Sourcepub fn with_capture_config(self, config: CaptureConfig) -> Self
pub fn with_capture_config(self, config: CaptureConfig) -> Self
Set custom capture configuration.
Sourcepub async fn install(self) -> Result<TelemetryHandle, StoreError>
pub async fn install(self) -> Result<TelemetryHandle, StoreError>
Build and start all telemetry components.
Creates the store, collector, optional Langfuse exporter, and optional dashboard server. Returns a handle that provides access to the collector and manages shutdown.
§Errors
Returns StoreError if the database cannot be opened or
the dashboard server cannot start.
Trait Implementations§
Source§impl Debug for TelemetryConfig
impl Debug for TelemetryConfig
Auto Trait Implementations§
impl Freeze for TelemetryConfig
impl RefUnwindSafe for TelemetryConfig
impl Send for TelemetryConfig
impl Sync for TelemetryConfig
impl Unpin for TelemetryConfig
impl UnsafeUnpin for TelemetryConfig
impl UnwindSafe for TelemetryConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more