xds_api/generated/
envoy.config.metrics.v3.rs

1// This file is @generated by prost-build.
2/// Configuration for pluggable stats sinks.
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct StatsSink {
5    /// The name of the stats sink to instantiate. The name must match a supported
6    /// stats sink.
7    /// See the :ref:`extensions listed in typed_config below <extension_category_envoy.stats_sinks>` for the default list of available stats sink.
8    /// Sinks optionally support tagged/multiple dimensional metrics.
9    #[prost(string, tag = "1")]
10    pub name: ::prost::alloc::string::String,
11    /// Stats sink specific configuration which depends on the sink being instantiated. See
12    /// :ref:`StatsdSink <envoy_v3_api_msg_config.metrics.v3.StatsdSink>` for an example.
13    /// \[#extension-category: envoy.stats_sinks\]
14    #[prost(oneof = "stats_sink::ConfigType", tags = "3")]
15    pub config_type: ::core::option::Option<stats_sink::ConfigType>,
16}
17/// Nested message and enum types in `StatsSink`.
18pub mod stats_sink {
19    /// Stats sink specific configuration which depends on the sink being instantiated. See
20    /// :ref:`StatsdSink <envoy_v3_api_msg_config.metrics.v3.StatsdSink>` for an example.
21    /// \[#extension-category: envoy.stats_sinks\]
22    #[derive(Clone, PartialEq, ::prost::Oneof)]
23    pub enum ConfigType {
24        #[prost(message, tag = "3")]
25        TypedConfig(super::super::super::super::super::google::protobuf::Any),
26    }
27}
28impl ::prost::Name for StatsSink {
29    const NAME: &'static str = "StatsSink";
30    const PACKAGE: &'static str = "envoy.config.metrics.v3";
31    fn full_name() -> ::prost::alloc::string::String {
32        "envoy.config.metrics.v3.StatsSink".into()
33    }
34    fn type_url() -> ::prost::alloc::string::String {
35        "type.googleapis.com/envoy.config.metrics.v3.StatsSink".into()
36    }
37}
38/// Statistics configuration such as tagging.
39#[derive(Clone, PartialEq, ::prost::Message)]
40pub struct StatsConfig {
41    /// Each stat name is independently processed through these tag specifiers. When a tag is
42    /// matched, the first capture group is not immediately removed from the name, so later
43    /// :ref:`TagSpecifiers <envoy_v3_api_msg_config.metrics.v3.TagSpecifier>` can also match that
44    /// same portion of the match. After all tag matching is complete, a tag-extracted version of
45    /// the name is produced and is used in stats sinks that represent tags, such as Prometheus.
46    #[prost(message, repeated, tag = "1")]
47    pub stats_tags: ::prost::alloc::vec::Vec<TagSpecifier>,
48    /// Use all default tag regexes specified in Envoy. These can be combined with
49    /// custom tags specified in :ref:`stats_tags
50    /// <envoy_v3_api_field_config.metrics.v3.StatsConfig.stats_tags>`. They will be processed before
51    /// the custom tags.
52    ///
53    /// .. note::
54    ///
55    ///    If any default tags are specified twice, the config will be considered
56    ///    invalid.
57    ///
58    /// See :repo:`well_known_names.h <source/common/config/well_known_names.h>` for a list of the
59    /// default tags in Envoy.
60    ///
61    /// If not provided, the value is assumed to be true.
62    #[prost(message, optional, tag = "2")]
63    pub use_all_default_tags: ::core::option::Option<
64        super::super::super::super::google::protobuf::BoolValue,
65    >,
66    /// Inclusion/exclusion matcher for stat name creation. If not provided, all stats are instantiated
67    /// as normal. Preventing the instantiation of certain families of stats can improve memory
68    /// performance for Envoys running especially large configs.
69    ///
70    /// .. warning::
71    ///    Excluding stats may affect Envoy's behavior in undocumented ways. See
72    ///    `issue #8771 <<https://github.com/envoyproxy/envoy/issues/8771>`_> for more information.
73    ///    If any unexpected behavior changes are observed, please open a new issue immediately.
74    #[prost(message, optional, tag = "3")]
75    pub stats_matcher: ::core::option::Option<StatsMatcher>,
76    /// Defines rules for setting the histogram buckets. Rules are evaluated in order, and the first
77    /// match is applied. If no match is found (or if no rules are set), the following default buckets
78    /// are used:
79    ///
80    ///    .. code-block:: json
81    ///
82    ///      [
83    ///        0.5,
84    ///        1,
85    ///        5,
86    ///        10,
87    ///        25,
88    ///        50,
89    ///        100,
90    ///        250,
91    ///        500,
92    ///        1000,
93    ///        2500,
94    ///        5000,
95    ///        10000,
96    ///        30000,
97    ///        60000,
98    ///        300000,
99    ///        600000,
100    ///        1800000,
101    ///        3600000
102    ///      ]
103    #[prost(message, repeated, tag = "4")]
104    pub histogram_bucket_settings: ::prost::alloc::vec::Vec<HistogramBucketSettings>,
105}
106impl ::prost::Name for StatsConfig {
107    const NAME: &'static str = "StatsConfig";
108    const PACKAGE: &'static str = "envoy.config.metrics.v3";
109    fn full_name() -> ::prost::alloc::string::String {
110        "envoy.config.metrics.v3.StatsConfig".into()
111    }
112    fn type_url() -> ::prost::alloc::string::String {
113        "type.googleapis.com/envoy.config.metrics.v3.StatsConfig".into()
114    }
115}
116/// Configuration for disabling stat instantiation.
117///
118/// The instantiation of stats is unrestricted by default. If the goal is to configure Envoy to
119/// instantiate all stats, there is no need to construct a StatsMatcher.
120///
121/// However, StatsMatcher can be used to limit the creation of families of stats in order to
122/// conserve memory. Stats can either be disabled entirely, or they can be
123/// limited by either an exclusion or an inclusion list of :ref:`StringMatcher
124/// <envoy_v3_api_msg_type.matcher.v3.StringMatcher>` protos:
125///
126/// * If ``reject_all`` is set to ``true``, no stats will be instantiated. If ``reject_all`` is set to
127///    ``false``, all stats will be instantiated.
128///
129/// * If an exclusion list is supplied, any stat name matching *any* of the StringMatchers in the
130///    list will not instantiate.
131///
132/// * If an inclusion list is supplied, no stats will instantiate, except those matching *any* of
133///    the StringMatchers in the list.
134///
135///
136/// A StringMatcher can be used to match against an exact string, a suffix / prefix, or a regex.
137/// **NB:** For performance reasons, it is highly recommended to use a prefix- or suffix-based
138/// matcher rather than a regex-based matcher.
139///
140/// Example 1. Excluding all stats.
141///
142/// .. code-block:: json
143///
144///    {
145///      "statsMatcher": {
146///        "rejectAll": "true"
147///      }
148///    }
149///
150/// Example 2. Excluding all cluster-specific stats, but not cluster-manager stats:
151///
152/// .. code-block:: json
153///
154///    {
155///      "statsMatcher": {
156///        "exclusionList": {
157///          "patterns": [
158///            {
159///              "prefix": "cluster."
160///            }
161///          ]
162///        }
163///      }
164///    }
165///
166/// Example 3. Including only manager-related stats:
167///
168/// .. code-block:: json
169///
170///    {
171///      "statsMatcher": {
172///        "inclusionList": {
173///          "patterns": [
174///            {
175///              "prefix": "cluster_manager."
176///            },
177///            {
178///              "prefix": "listener_manager."
179///            }
180///          ]
181///        }
182///      }
183///    }
184///
185#[derive(Clone, PartialEq, ::prost::Message)]
186pub struct StatsMatcher {
187    #[prost(oneof = "stats_matcher::StatsMatcher", tags = "1, 2, 3")]
188    pub stats_matcher: ::core::option::Option<stats_matcher::StatsMatcher>,
189}
190/// Nested message and enum types in `StatsMatcher`.
191pub mod stats_matcher {
192    #[derive(Clone, PartialEq, ::prost::Oneof)]
193    pub enum StatsMatcher {
194        /// If ``reject_all`` is true, then all stats are disabled. If ``reject_all`` is false, then all
195        /// stats are enabled.
196        #[prost(bool, tag = "1")]
197        RejectAll(bool),
198        /// Exclusive match. All stats are enabled except for those matching one of the supplied
199        /// StringMatcher protos.
200        #[prost(message, tag = "2")]
201        ExclusionList(
202            super::super::super::super::r#type::matcher::v3::ListStringMatcher,
203        ),
204        /// Inclusive match. No stats are enabled except for those matching one of the supplied
205        /// StringMatcher protos.
206        #[prost(message, tag = "3")]
207        InclusionList(
208            super::super::super::super::r#type::matcher::v3::ListStringMatcher,
209        ),
210    }
211}
212impl ::prost::Name for StatsMatcher {
213    const NAME: &'static str = "StatsMatcher";
214    const PACKAGE: &'static str = "envoy.config.metrics.v3";
215    fn full_name() -> ::prost::alloc::string::String {
216        "envoy.config.metrics.v3.StatsMatcher".into()
217    }
218    fn type_url() -> ::prost::alloc::string::String {
219        "type.googleapis.com/envoy.config.metrics.v3.StatsMatcher".into()
220    }
221}
222/// Designates a tag name and value pair. The value may be either a fixed value
223/// or a regex providing the value via capture groups. The specified tag will be
224/// unconditionally set if a fixed value, otherwise it will only be set if one
225/// or more capture groups in the regex match.
226#[derive(Clone, PartialEq, ::prost::Message)]
227pub struct TagSpecifier {
228    /// Attaches an identifier to the tag values to identify the tag being in the
229    /// sink. Envoy has a set of default names and regexes to extract dynamic
230    /// portions of existing stats, which can be found in :repo:`well_known_names.h
231    /// <source/common/config/well_known_names.h>` in the Envoy repository. If a :ref:`tag_name
232    /// <envoy_v3_api_field_config.metrics.v3.TagSpecifier.tag_name>` is provided in the config and
233    /// neither :ref:`regex <envoy_v3_api_field_config.metrics.v3.TagSpecifier.regex>` or
234    /// :ref:`fixed_value <envoy_v3_api_field_config.metrics.v3.TagSpecifier.fixed_value>` were specified,
235    /// Envoy will attempt to find that name in its set of defaults and use the accompanying regex.
236    ///
237    /// .. note::
238    ///
239    ///    A stat name may be spelled in such a way that it matches two different
240    ///    tag extractors for the same tag name. In that case, all but one of the
241    ///    tag values will be dropped. It is not specified which tag value will be
242    ///    retained. The extraction will only occur for one of the extractors, and
243    ///    only the matched extraction will be removed from the tag name.
244    #[prost(string, tag = "1")]
245    pub tag_name: ::prost::alloc::string::String,
246    #[prost(oneof = "tag_specifier::TagValue", tags = "2, 3")]
247    pub tag_value: ::core::option::Option<tag_specifier::TagValue>,
248}
249/// Nested message and enum types in `TagSpecifier`.
250pub mod tag_specifier {
251    #[derive(Clone, PartialEq, ::prost::Oneof)]
252    pub enum TagValue {
253        /// Designates a tag to strip from the tag extracted name and provide as a named
254        /// tag value for all statistics. This will only occur if any part of the name
255        /// matches the regex provided with one or more capture groups.
256        ///
257        /// The first capture group identifies the portion of the name to remove. The
258        /// second capture group (which will normally be nested inside the first) will
259        /// designate the value of the tag for the statistic. If no second capture
260        /// group is provided, the first will also be used to set the value of the tag.
261        /// All other capture groups will be ignored.
262        ///
263        /// Example 1. a stat name ``cluster.foo_cluster.upstream_rq_timeout`` and
264        /// one tag specifier:
265        ///
266        /// .. code-block:: json
267        ///
268        ///    {
269        ///      "tag_name": "envoy.cluster_name",
270        ///      "regex": "^cluster\\.((.+?)\\.)"
271        ///    }
272        ///
273        /// Note that the regex will remove ``foo_cluster.`` making the tag extracted
274        /// name ``cluster.upstream_rq_timeout`` and the tag value for
275        /// ``envoy.cluster_name`` will be ``foo_cluster`` (note: there will be no
276        /// ``.`` character because of the second capture group).
277        ///
278        /// Example 2. a stat name
279        /// ``http.connection_manager_1.user_agent.ios.downstream_cx_total`` and two
280        /// tag specifiers:
281        ///
282        /// .. code-block:: json
283        ///
284        ///    [
285        ///      {
286        ///        "tag_name": "envoy.http_user_agent",
287        ///        "regex": "^http(?=\\.).*?\\.user_agent\\.((.+?)\\.)\\w+?$"
288        ///      },
289        ///      {
290        ///        "tag_name": "envoy.http_conn_manager_prefix",
291        ///        "regex": "^http\\.((.*?)\\.)"
292        ///      }
293        ///    ]
294        ///
295        /// The two regexes of the specifiers will be processed from the elaborated
296        /// stat name.
297        ///
298        /// The first regex will save ``ios.`` as the tag value for ``envoy.http_user_agent``. It will
299        /// leave it in the name for potential matching with additional tag specifiers. After all tag
300        /// specifiers are processed the tags will be removed from the name.
301        ///
302        /// The second regex will populate tag ``envoy.http_conn_manager_prefix`` with value
303        /// ``connection_manager_1.``, based on the original stat name.
304        ///
305        /// As a final step, the matched tags are removed, leaving
306        /// ``http.user_agent.downstream_cx_total`` as the tag extracted name.
307        #[prost(string, tag = "2")]
308        Regex(::prost::alloc::string::String),
309        /// Specifies a fixed tag value for the ``tag_name``.
310        #[prost(string, tag = "3")]
311        FixedValue(::prost::alloc::string::String),
312    }
313}
314impl ::prost::Name for TagSpecifier {
315    const NAME: &'static str = "TagSpecifier";
316    const PACKAGE: &'static str = "envoy.config.metrics.v3";
317    fn full_name() -> ::prost::alloc::string::String {
318        "envoy.config.metrics.v3.TagSpecifier".into()
319    }
320    fn type_url() -> ::prost::alloc::string::String {
321        "type.googleapis.com/envoy.config.metrics.v3.TagSpecifier".into()
322    }
323}
324/// Specifies a matcher for stats and the buckets that matching stats should use.
325#[derive(Clone, PartialEq, ::prost::Message)]
326pub struct HistogramBucketSettings {
327    /// The stats that this rule applies to. The match is applied to the original stat name
328    /// before tag-extraction, for example ``cluster.exampleclustername.upstream_cx_length_ms``.
329    #[prost(message, optional, tag = "1")]
330    pub r#match: ::core::option::Option<
331        super::super::super::r#type::matcher::v3::StringMatcher,
332    >,
333    /// Each value is the upper bound of a bucket. Each bucket must be greater than 0 and unique.
334    /// The order of the buckets does not matter.
335    #[prost(double, repeated, packed = "false", tag = "2")]
336    pub buckets: ::prost::alloc::vec::Vec<f64>,
337}
338impl ::prost::Name for HistogramBucketSettings {
339    const NAME: &'static str = "HistogramBucketSettings";
340    const PACKAGE: &'static str = "envoy.config.metrics.v3";
341    fn full_name() -> ::prost::alloc::string::String {
342        "envoy.config.metrics.v3.HistogramBucketSettings".into()
343    }
344    fn type_url() -> ::prost::alloc::string::String {
345        "type.googleapis.com/envoy.config.metrics.v3.HistogramBucketSettings".into()
346    }
347}
348/// Stats configuration proto schema for built-in ``envoy.stat_sinks.statsd`` sink. This sink does not support
349/// tagged metrics.
350/// \[#extension: envoy.stat_sinks.statsd\]
351#[derive(Clone, PartialEq, ::prost::Message)]
352pub struct StatsdSink {
353    /// Optional custom prefix for StatsdSink. If
354    /// specified, this will override the default prefix.
355    /// For example:
356    ///
357    /// .. code-block:: json
358    ///
359    ///    {
360    ///      "prefix" : "envoy-prod"
361    ///    }
362    ///
363    /// will change emitted stats to
364    ///
365    /// .. code-block:: cpp
366    ///
367    ///    envoy-prod.test_counter:1|c
368    ///    envoy-prod.test_timer:5|ms
369    ///
370    /// Note that the default prefix, "envoy", will be used if a prefix is not
371    /// specified.
372    ///
373    /// Stats with default prefix:
374    ///
375    /// .. code-block:: cpp
376    ///
377    ///    envoy.test_counter:1|c
378    ///    envoy.test_timer:5|ms
379    #[prost(string, tag = "3")]
380    pub prefix: ::prost::alloc::string::String,
381    #[prost(oneof = "statsd_sink::StatsdSpecifier", tags = "1, 2")]
382    pub statsd_specifier: ::core::option::Option<statsd_sink::StatsdSpecifier>,
383}
384/// Nested message and enum types in `StatsdSink`.
385pub mod statsd_sink {
386    #[derive(Clone, PartialEq, ::prost::Oneof)]
387    pub enum StatsdSpecifier {
388        /// The UDP address of a running `statsd <<https://github.com/etsy/statsd>`_>
389        /// compliant listener. If specified, statistics will be flushed to this
390        /// address.
391        #[prost(message, tag = "1")]
392        Address(super::super::super::core::v3::Address),
393        /// The name of a cluster that is running a TCP `statsd
394        /// <<https://github.com/etsy/statsd>`_> compliant listener. If specified,
395        /// Envoy will connect to this cluster to flush statistics.
396        #[prost(string, tag = "2")]
397        TcpClusterName(::prost::alloc::string::String),
398    }
399}
400impl ::prost::Name for StatsdSink {
401    const NAME: &'static str = "StatsdSink";
402    const PACKAGE: &'static str = "envoy.config.metrics.v3";
403    fn full_name() -> ::prost::alloc::string::String {
404        "envoy.config.metrics.v3.StatsdSink".into()
405    }
406    fn type_url() -> ::prost::alloc::string::String {
407        "type.googleapis.com/envoy.config.metrics.v3.StatsdSink".into()
408    }
409}
410/// Stats configuration proto schema for built-in ``envoy.stat_sinks.dog_statsd`` sink.
411/// The sink emits stats with `DogStatsD <<https://docs.datadoghq.com/guides/dogstatsd/>`_>
412/// compatible tags. Tags are configurable via :ref:`StatsConfig
413/// <envoy_v3_api_msg_config.metrics.v3.StatsConfig>`.
414/// \[#extension: envoy.stat_sinks.dog_statsd\]
415#[derive(Clone, PartialEq, ::prost::Message)]
416pub struct DogStatsdSink {
417    /// Optional custom metric name prefix. See :ref:`StatsdSink's prefix field
418    /// <envoy_v3_api_field_config.metrics.v3.StatsdSink.prefix>` for more details.
419    #[prost(string, tag = "3")]
420    pub prefix: ::prost::alloc::string::String,
421    /// Optional max datagram size to use when sending UDP messages. By default Envoy
422    /// will emit one metric per datagram. By specifying a max-size larger than a single
423    /// metric, Envoy will emit multiple, new-line separated metrics. The max datagram
424    /// size should not exceed your network's MTU.
425    ///
426    /// Note that this value may not be respected if smaller than a single metric.
427    #[prost(message, optional, tag = "4")]
428    pub max_bytes_per_datagram: ::core::option::Option<
429        super::super::super::super::google::protobuf::UInt64Value,
430    >,
431    #[prost(oneof = "dog_statsd_sink::DogStatsdSpecifier", tags = "1")]
432    pub dog_statsd_specifier: ::core::option::Option<
433        dog_statsd_sink::DogStatsdSpecifier,
434    >,
435}
436/// Nested message and enum types in `DogStatsdSink`.
437pub mod dog_statsd_sink {
438    #[derive(Clone, PartialEq, ::prost::Oneof)]
439    pub enum DogStatsdSpecifier {
440        /// The UDP address of a running DogStatsD compliant listener. If specified,
441        /// statistics will be flushed to this address.
442        #[prost(message, tag = "1")]
443        Address(super::super::super::core::v3::Address),
444    }
445}
446impl ::prost::Name for DogStatsdSink {
447    const NAME: &'static str = "DogStatsdSink";
448    const PACKAGE: &'static str = "envoy.config.metrics.v3";
449    fn full_name() -> ::prost::alloc::string::String {
450        "envoy.config.metrics.v3.DogStatsdSink".into()
451    }
452    fn type_url() -> ::prost::alloc::string::String {
453        "type.googleapis.com/envoy.config.metrics.v3.DogStatsdSink".into()
454    }
455}
456/// Stats configuration proto schema for built-in ``envoy.stat_sinks.hystrix`` sink.
457/// The sink emits stats in `text/event-stream
458/// <<https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events>`_>
459/// formatted stream for use by `Hystrix dashboard
460/// <<https://github.com/Netflix-Skunkworks/hystrix-dashboard/wiki>`_.>
461///
462/// Note that only a single HystrixSink should be configured.
463///
464/// Streaming is started through an admin endpoint :http:get:`/hystrix_event_stream`.
465/// \[#extension: envoy.stat_sinks.hystrix\]
466#[derive(Clone, Copy, PartialEq, ::prost::Message)]
467pub struct HystrixSink {
468    /// The number of buckets the rolling statistical window is divided into.
469    ///
470    /// Each time the sink is flushed, all relevant Envoy statistics are sampled and
471    /// added to the rolling window (removing the oldest samples in the window
472    /// in the process). The sink then outputs the aggregate statistics across the
473    /// current rolling window to the event stream(s).
474    ///
475    /// ``rolling_window(ms)`` = ``stats_flush_interval(ms)`` * ``num_of_buckets``
476    ///
477    /// More detailed explanation can be found in `Hystrix wiki
478    /// <<https://github.com/Netflix/Hystrix/wiki/Metrics-and-Monitoring#hystrixrollingnumber>`_.>
479    #[prost(int64, tag = "1")]
480    pub num_buckets: i64,
481}
482impl ::prost::Name for HystrixSink {
483    const NAME: &'static str = "HystrixSink";
484    const PACKAGE: &'static str = "envoy.config.metrics.v3";
485    fn full_name() -> ::prost::alloc::string::String {
486        "envoy.config.metrics.v3.HystrixSink".into()
487    }
488    fn type_url() -> ::prost::alloc::string::String {
489        "type.googleapis.com/envoy.config.metrics.v3.HystrixSink".into()
490    }
491}
492/// Metrics Service is configured as a built-in ``envoy.stat_sinks.metrics_service`` :ref:`StatsSink
493/// <envoy_v3_api_msg_config.metrics.v3.StatsSink>`. This opaque configuration will be used to create
494/// Metrics Service.
495///
496/// Example:
497///
498/// .. code-block:: yaml
499///
500///      stats_sinks:
501///        - name: envoy.stat_sinks.metrics_service
502///          typed_config:
503///            "@type": type.googleapis.com/envoy.config.metrics.v3.MetricsServiceConfig
504///
505/// \[#extension: envoy.stat_sinks.metrics_service\]
506/// \[#next-free-field: 6\]
507#[derive(Clone, PartialEq, ::prost::Message)]
508pub struct MetricsServiceConfig {
509    /// The upstream gRPC cluster that hosts the metrics service.
510    #[prost(message, optional, tag = "1")]
511    pub grpc_service: ::core::option::Option<super::super::core::v3::GrpcService>,
512    /// API version for metric service transport protocol. This describes the metric service gRPC
513    /// endpoint and version of messages used on the wire.
514    #[prost(enumeration = "super::super::core::v3::ApiVersion", tag = "3")]
515    pub transport_api_version: i32,
516    /// If true, counters are reported as the delta between flushing intervals. Otherwise, the current
517    /// counter value is reported. Defaults to false.
518    /// Eventually (<https://github.com/envoyproxy/envoy/issues/10968>) if this value is not set, the
519    /// sink will take updates from the :ref:`MetricsResponse <envoy_v3_api_msg_service.metrics.v3.StreamMetricsResponse>`.
520    #[prost(message, optional, tag = "2")]
521    pub report_counters_as_deltas: ::core::option::Option<
522        super::super::super::super::google::protobuf::BoolValue,
523    >,
524    /// If true, metrics will have their tags emitted as labels on the metrics objects sent to the MetricsService,
525    /// and the tag extracted name will be used instead of the full name, which may contain values used by the tag
526    /// extractor or additional tags added during stats creation.
527    #[prost(bool, tag = "4")]
528    pub emit_tags_as_labels: bool,
529    /// Specify which metrics types to emit for histograms. Defaults to SUMMARY_AND_HISTOGRAM.
530    #[prost(enumeration = "HistogramEmitMode", tag = "5")]
531    pub histogram_emit_mode: i32,
532}
533impl ::prost::Name for MetricsServiceConfig {
534    const NAME: &'static str = "MetricsServiceConfig";
535    const PACKAGE: &'static str = "envoy.config.metrics.v3";
536    fn full_name() -> ::prost::alloc::string::String {
537        "envoy.config.metrics.v3.MetricsServiceConfig".into()
538    }
539    fn type_url() -> ::prost::alloc::string::String {
540        "type.googleapis.com/envoy.config.metrics.v3.MetricsServiceConfig".into()
541    }
542}
543/// HistogramEmitMode is used to configure which metric types should be emitted for histograms.
544#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
545#[repr(i32)]
546pub enum HistogramEmitMode {
547    /// Emit Histogram and Summary metric types.
548    SummaryAndHistogram = 0,
549    /// Emit only Summary metric types.
550    Summary = 1,
551    /// Emit only Histogram metric types.
552    Histogram = 2,
553}
554impl HistogramEmitMode {
555    /// String value of the enum field names used in the ProtoBuf definition.
556    ///
557    /// The values are not transformed in any way and thus are considered stable
558    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
559    pub fn as_str_name(&self) -> &'static str {
560        match self {
561            Self::SummaryAndHistogram => "SUMMARY_AND_HISTOGRAM",
562            Self::Summary => "SUMMARY",
563            Self::Histogram => "HISTOGRAM",
564        }
565    }
566    /// Creates an enum from field names used in the ProtoBuf definition.
567    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
568        match value {
569            "SUMMARY_AND_HISTOGRAM" => Some(Self::SummaryAndHistogram),
570            "SUMMARY" => Some(Self::Summary),
571            "HISTOGRAM" => Some(Self::Histogram),
572            _ => None,
573        }
574    }
575}