pub struct OtelConfig {
pub enable: bool,
pub session_id: Option<String>,
pub export_interval_ms: u32,
}Expand description
OpenTelemetry configuration for a Processor or Vad.
Pass to Processor::with_otel_config or Vad::with_otel_config
to control telemetry on a per-instance basis. When no OtelConfig is provided (e.g. when
using Processor::new), telemetry is configured according to the runtime environment
(e.g. the AIC_SDK_OTEL_ENABLE environment variable).
Fields§
§enable: boolWhether to enable OpenTelemetry telemetry.
Overrides the AIC_SDK_OTEL_ENABLE environment variable.
session_id: Option<String>Optional session ID for telemetry. If None, a random session ID is generated.
export_interval_ms: u32OpenTelemetry metric export interval in milliseconds.
Set to 0 to use the SDK default of 60 000 ms.
Implementations§
Source§impl OtelConfig
impl OtelConfig
Sourcepub fn disabled() -> Self
pub fn disabled() -> Self
Returns an OtelConfig with telemetry disabled.
Sourcepub fn enabled() -> Self
pub fn enabled() -> Self
Returns an OtelConfig with telemetry enabled.
Sourcepub fn with_session_id(session_id: impl Into<String>) -> Self
pub fn with_session_id(session_id: impl Into<String>) -> Self
Returns an OtelConfig with telemetry enabled and the provided session ID.
Trait Implementations§
Source§impl Clone for OtelConfig
impl Clone for OtelConfig
Source§fn clone(&self) -> OtelConfig
fn clone(&self) -> OtelConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OtelConfig
impl Debug for OtelConfig
impl Eq for OtelConfig
Source§impl Hash for OtelConfig
impl Hash for OtelConfig
Source§impl PartialEq for OtelConfig
impl PartialEq for OtelConfig
impl StructuralPartialEq for OtelConfig
Auto Trait Implementations§
impl Freeze for OtelConfig
impl RefUnwindSafe for OtelConfig
impl Send for OtelConfig
impl Sync for OtelConfig
impl Unpin for OtelConfig
impl UnsafeUnpin for OtelConfig
impl UnwindSafe for OtelConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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