pub struct GlobalHistogram<N: HistogramValue = f64> { /* private fields */ }Implementations§
Source§impl<N: HistogramValue> GlobalHistogram<N>
impl<N: HistogramValue> GlobalHistogram<N>
Sourcepub const fn new(name: &'static str) -> Self
pub const fn new(name: &'static str) -> Self
Declares the histogram name: a letter, then letters, digits, _, ., - and /. It must be a string literal: Encore reads it from the source.
Sourcepub const fn unit(self, unit: &'static str) -> Self
pub const fn unit(self, unit: &'static str) -> Self
What the histogram measures in, as exported: "s", "By", "{request}".
Sourcepub const fn description(self, description: &'static str) -> Self
pub const fn description(self, description: &'static str) -> Self
What the histogram measures, for one without a doc comment.
Sourcepub const fn buckets(self, bounds: &'static [f64]) -> Self
pub const fn buckets(self, bounds: &'static [f64]) -> Self
The upper bounds of the buckets, increasing: what is recorded is counted in the first it is no greater than, or one past the last. Without them, the OpenTelemetry SDK’s defaults.
Sourcepub fn reference(&self) -> &Self
pub fn reference(&self) -> &Self
The histogram itself, to hand to other code: a function that takes a &GlobalHistogram records to whichever it is given.
A metric is otherwise used where it is declared, by name, which is how Encore sees which service records to it. Passing one on says so explicitly, and counts as recording to it.
Auto Trait Implementations§
impl<N = f64> !Freeze for GlobalHistogram<N>
impl<N = f64> !RefUnwindSafe for GlobalHistogram<N>
impl<N = f64> !UnwindSafe for GlobalHistogram<N>
impl<N> Send for GlobalHistogram<N>
impl<N> Sync for GlobalHistogram<N>
impl<N> Unpin for GlobalHistogram<N>
impl<N> UnsafeUnpin for GlobalHistogram<N>
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
Converts
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> ⓘ
Converts
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>
Wrap the input message
T in a tonic::Request