pub struct RequestedTelemetryAttributes { /* private fields */ }Expand description
The operation-input member names a customer has opted in to for telemetry, split into two independent policies.
Every requested member is captured into CapturedTelemetryAttributes on the config bag; the
two sets differ only in whether the value is also emitted on the built-in client metrics:
- emit — the value is captured and attached to the built-in client metrics as an
attribute. This is the common case (
emit_input_attributes). - capture-only — the value is captured so a custom interceptor can read it during the
operation, but it is not attached to the built-in metrics (
capture_input_attributes). This keeps a high-cardinality value out of the metric label set while still making it available in-process.
The generated per-operation interceptor captures the union of both sets; the built-in metrics implementation emits only the emit set. Absent unless the customer opts in, so both are a no-op by default.
Names are the Smithy member names (e.g. "Bucket"), matched by generated code against the
operation’s input members.
Implementations§
Source§impl RequestedTelemetryAttributes
impl RequestedTelemetryAttributes
Sourcepub fn new(names: impl IntoIterator<Item = impl AsRef<str>>) -> Self
pub fn new(names: impl IntoIterator<Item = impl AsRef<str>>) -> Self
Creates a selection whose members are both captured and emitted on the metrics.
Takes impl AsRef<str> items so the public API doesn’t commit to the internal storage
type; names are cloned into the backing representation here.
Sourcepub fn emit(&mut self, names: impl IntoIterator<Item = impl AsRef<str>>)
pub fn emit(&mut self, names: impl IntoIterator<Item = impl AsRef<str>>)
Adds member names to the emit set (captured and attached to the built-in metrics).
Sourcepub fn capture_only(&mut self, names: impl IntoIterator<Item = impl AsRef<str>>)
pub fn capture_only(&mut self, names: impl IntoIterator<Item = impl AsRef<str>>)
Adds member names to the capture-only set (captured for in-process reads, not emitted on the built-in metrics).
Sourcepub fn should_capture(&self, name: &str) -> bool
pub fn should_capture(&self, name: &str) -> bool
Returns true if name should be captured (in either set).
Sourcepub fn should_emit(&self, name: &str) -> bool
pub fn should_emit(&self, name: &str) -> bool
Returns true if name should be emitted on the built-in metrics.
Trait Implementations§
Source§impl Clone for RequestedTelemetryAttributes
impl Clone for RequestedTelemetryAttributes
Source§fn clone(&self) -> RequestedTelemetryAttributes
fn clone(&self) -> RequestedTelemetryAttributes
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RequestedTelemetryAttributes
impl Debug for RequestedTelemetryAttributes
Source§impl Default for RequestedTelemetryAttributes
impl Default for RequestedTelemetryAttributes
Source§fn default() -> RequestedTelemetryAttributes
fn default() -> RequestedTelemetryAttributes
Source§impl PartialEq for RequestedTelemetryAttributes
impl PartialEq for RequestedTelemetryAttributes
Source§fn eq(&self, other: &RequestedTelemetryAttributes) -> bool
fn eq(&self, other: &RequestedTelemetryAttributes) -> bool
self and other values to be equal, and is used by ==.Source§impl Storable for RequestedTelemetryAttributes
impl Storable for RequestedTelemetryAttributes
Source§type Storer = StoreReplace<RequestedTelemetryAttributes>
type Storer = StoreReplace<RequestedTelemetryAttributes>
StoreReplace and StoreAppendimpl Eq for RequestedTelemetryAttributes
impl StructuralPartialEq for RequestedTelemetryAttributes
Auto Trait Implementations§
impl Freeze for RequestedTelemetryAttributes
impl RefUnwindSafe for RequestedTelemetryAttributes
impl Send for RequestedTelemetryAttributes
impl Sync for RequestedTelemetryAttributes
impl Unpin for RequestedTelemetryAttributes
impl UnsafeUnpin for RequestedTelemetryAttributes
impl UnwindSafe for RequestedTelemetryAttributes
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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