pub struct StatsConfig {
pub stats_tags: Vec<TagSpecifier>,
pub use_all_default_tags: Option<BoolValue>,
pub stats_matcher: Option<StatsMatcher>,
pub histogram_bucket_settings: Vec<HistogramBucketSettings>,
}
Expand description
Statistics configuration such as tagging.
Fields§
Each stat name is independently processed through these tag specifiers. When a tag is
matched, the first capture group is not immediately removed from the name, so later
:ref:TagSpecifiers <envoy_v3_api_msg_config.metrics.v3.TagSpecifier>
can also match that
same portion of the match. After all tag matching is complete, a tag-extracted version of
the name is produced and is used in stats sinks that represent tags, such as Prometheus.
Use all default tag regexes specified in Envoy. These can be combined with
custom tags specified in :ref:stats_tags <envoy_v3_api_field_config.metrics.v3.StatsConfig.stats_tags>
. They will be processed before
the custom tags.
.. note::
If any default tags are specified twice, the config will be considered invalid.
See :repo:well_known_names.h <source/common/config/well_known_names.h>
for a list of the
default tags in Envoy.
If not provided, the value is assumed to be true.
stats_matcher: Option<StatsMatcher>
Inclusion/exclusion matcher for stat name creation. If not provided, all stats are instantiated as normal. Preventing the instantiation of certain families of stats can improve memory performance for Envoys running especially large configs.
.. warning::
Excluding stats may affect Envoy’s behavior in undocumented ways. See
issue #8771 <<https://github.com/envoyproxy/envoy/issues/8771>
_> for more information.
If any unexpected behavior changes are observed, please open a new issue immediately.
histogram_bucket_settings: Vec<HistogramBucketSettings>
Defines rules for setting the histogram buckets. Rules are evaluated in order, and the first match is applied. If no match is found (or if no rules are set), the following default buckets are used:
.. code-block:: json
[
0.5,
1,
5,
10,
25,
50,
100,
250,
500,
1000,
2500,
5000,
10000,
30000,
60000,
300000,
600000,
1800000,
3600000
]
Trait Implementations§
Source§impl Clone for StatsConfig
impl Clone for StatsConfig
Source§fn clone(&self) -> StatsConfig
fn clone(&self) -> StatsConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for StatsConfig
impl Debug for StatsConfig
Source§impl Default for StatsConfig
impl Default for StatsConfig
Source§impl Message for StatsConfig
impl Message for StatsConfig
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 StatsConfig
impl Name for StatsConfig
Source§const NAME: &'static str = "StatsConfig"
const NAME: &'static str = "StatsConfig"
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 StatsConfig
impl PartialEq for StatsConfig
impl StructuralPartialEq for StatsConfig
Auto Trait Implementations§
impl Freeze for StatsConfig
impl RefUnwindSafe for StatsConfig
impl Send for StatsConfig
impl Sync for StatsConfig
impl Unpin for StatsConfig
impl UnwindSafe for StatsConfig
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