pub struct FastTelemetryConfig {
pub tenant: Arc<str>,
pub resource_attributes: Arc<Vec<TelemetryAttribute>>,
pub scope_version: Arc<str>,
pub interval: Duration,
pub max_points_per_export: usize,
pub skip_empty_cumulative: bool,
pub wait_for_index: bool,
}Expand description
Bounded configuration for a periodic fast-telemetry snapshot.
Fields§
§tenant: Arc<str>Tenant attached to every exported metric series.
resource_attributes: Arc<Vec<TelemetryAttribute>>Resource attributes attached to every exported metric series.
scope_version: Arc<str>Version attached to each registered fast-telemetry scope.
interval: DurationRecommended interval for the host-owned export timer.
max_points_per_export: usizeMaximum points emitted by one runtime snapshot.
skip_empty_cumulative: boolWhether zero counters and empty histograms/distributions are skipped.
wait_for_index: boolWhether an export waits until the local query index has applied its WAL append.
Implementations§
Source§impl FastTelemetryConfig
impl FastTelemetryConfig
Sourcepub fn new(
tenant: impl Into<Arc<str>>,
service_name: impl Into<Arc<str>>,
) -> Self
pub fn new( tenant: impl Into<Arc<str>>, service_name: impl Into<Arc<str>>, ) -> Self
Creates a conventional configuration with one service.name resource
attribute.
Sourcepub fn with_resource_attribute(self, attribute: TelemetryAttribute) -> Self
pub fn with_resource_attribute(self, attribute: TelemetryAttribute) -> Self
Adds one typed resource attribute to every exported series.
Sourcepub const fn with_interval(self, interval: Duration) -> Self
pub const fn with_interval(self, interval: Duration) -> Self
Sets the recommended host-owned export interval.
Sourcepub const fn with_max_points_per_export(self, max_points: usize) -> Self
pub const fn with_max_points_per_export(self, max_points: usize) -> Self
Sets the maximum points accepted from one snapshot.
Sourcepub const fn with_skip_empty_cumulative(self, skip: bool) -> Self
pub const fn with_skip_empty_cumulative(self, skip: bool) -> Self
Sets whether empty cumulative instruments are omitted.
Sourcepub const fn with_wait_for_index(self, wait_for_index: bool) -> Self
pub const fn with_wait_for_index(self, wait_for_index: bool) -> Self
Chooses between query-visible and WAL-only local acknowledgement.
Trait Implementations§
Source§impl Clone for FastTelemetryConfig
impl Clone for FastTelemetryConfig
Source§impl Debug for FastTelemetryConfig
impl Debug for FastTelemetryConfig
impl Eq for FastTelemetryConfig
Source§impl PartialEq for FastTelemetryConfig
impl PartialEq for FastTelemetryConfig
impl StructuralPartialEq for FastTelemetryConfig
Auto Trait Implementations§
impl Freeze for FastTelemetryConfig
impl RefUnwindSafe for FastTelemetryConfig
impl Send for FastTelemetryConfig
impl Sync for FastTelemetryConfig
impl Unpin for FastTelemetryConfig
impl UnsafeUnpin for FastTelemetryConfig
impl UnwindSafe for FastTelemetryConfig
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request