pub struct StatsMatcher {
pub stats_matcher: Option<StatsMatcher>,
}
Expand description
Configuration for disabling stat instantiation.
The instantiation of stats is unrestricted by default. If the goal is to configure Envoy to instantiate all stats, there is no need to construct a StatsMatcher.
However, StatsMatcher can be used to limit the creation of families of stats in order to
conserve memory. Stats can either be disabled entirely, or they can be
limited by either an exclusion or an inclusion list of :ref:StringMatcher <envoy_v3_api_msg_type.matcher.v3.StringMatcher>
protos:
-
If
reject_all
is set totrue
, no stats will be instantiated. Ifreject_all
is set tofalse
, all stats will be instantiated. -
If an exclusion list is supplied, any stat name matching any of the StringMatchers in the list will not instantiate.
-
If an inclusion list is supplied, no stats will instantiate, except those matching any of the StringMatchers in the list.
A StringMatcher can be used to match against an exact string, a suffix / prefix, or a regex. NB: For performance reasons, it is highly recommended to use a prefix- or suffix-based matcher rather than a regex-based matcher.
Example 1. Excluding all stats.
.. code-block:: json
{ “statsMatcher”: { “rejectAll”: “true” } }
Example 2. Excluding all cluster-specific stats, but not cluster-manager stats:
.. code-block:: json
{ “statsMatcher”: { “exclusionList”: { “patterns”: [ { “prefix”: “cluster.” } ] } } }
Example 3. Including only manager-related stats:
.. code-block:: json
{ “statsMatcher”: { “inclusionList”: { “patterns”: [ { “prefix”: “cluster_manager.” }, { “prefix”: “listener_manager.” } ] } } }
Fields§
§stats_matcher: Option<StatsMatcher>
Trait Implementations§
Source§impl Clone for StatsMatcher
impl Clone for StatsMatcher
Source§fn clone(&self) -> StatsMatcher
fn clone(&self) -> StatsMatcher
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for StatsMatcher
impl Debug for StatsMatcher
Source§impl Default for StatsMatcher
impl Default for StatsMatcher
Source§impl Message for StatsMatcher
impl Message for StatsMatcher
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.Source§impl Name for StatsMatcher
impl Name for StatsMatcher
Source§const NAME: &'static str = "StatsMatcher"
const NAME: &'static str = "StatsMatcher"
Message
.
This name is the same as it appears in the source .proto file, e.g. FooBar
.Source§const PACKAGE: &'static str = "envoy.config.metrics.v3"
const PACKAGE: &'static str = "envoy.config.metrics.v3"
.
, e.g. google.protobuf
.Source§fn full_name() -> String
fn full_name() -> String
Message
.
It’s prefixed with the package name and names of any parent messages,
e.g. google.rpc.BadRequest.FieldViolation
.
By default, this is the package name followed by the message name.
Fully-qualified names must be unique within a domain of Type URLs.Source§impl PartialEq for StatsMatcher
impl PartialEq for StatsMatcher
impl StructuralPartialEq for StatsMatcher
Auto Trait Implementations§
impl Freeze for StatsMatcher
impl RefUnwindSafe for StatsMatcher
impl Send for StatsMatcher
impl Sync for StatsMatcher
impl Unpin for StatsMatcher
impl UnwindSafe for StatsMatcher
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> 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