Class MetricsServiceConfig.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<MetricsServiceConfig.Builder>
io.envoyproxy.envoy.config.metrics.v3.MetricsServiceConfig.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, MetricsServiceConfigOrBuilder, Cloneable
Enclosing class:
MetricsServiceConfig

public static final class MetricsServiceConfig.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<MetricsServiceConfig.Builder> implements MetricsServiceConfigOrBuilder
 Metrics Service is configured as a built-in ``envoy.stat_sinks.metrics_service`` :ref:`StatsSink
 <envoy_v3_api_msg_config.metrics.v3.StatsSink>`. This opaque configuration will be used to create
 Metrics Service.

 Example:

 .. code-block:: yaml

     stats_sinks:
       - name: envoy.stat_sinks.metrics_service
         typed_config:
           "@type": type.googleapis.com/envoy.config.metrics.v3.MetricsServiceConfig

 [#extension: envoy.stat_sinks.metrics_service]
 [#next-free-field: 7]
 
Protobuf type envoy.config.metrics.v3.MetricsServiceConfig
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<MetricsServiceConfig.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessageV3.Builder<MetricsServiceConfig.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<MetricsServiceConfig.Builder>
    • getDefaultInstanceForType

      public MetricsServiceConfig getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public MetricsServiceConfig build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public MetricsServiceConfig buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<MetricsServiceConfig.Builder>
    • setField

      public MetricsServiceConfig.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<MetricsServiceConfig.Builder>
    • clearField

      public MetricsServiceConfig.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<MetricsServiceConfig.Builder>
    • clearOneof

      public MetricsServiceConfig.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<MetricsServiceConfig.Builder>
    • setRepeatedField

      public MetricsServiceConfig.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<MetricsServiceConfig.Builder>
    • addRepeatedField

      public MetricsServiceConfig.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<MetricsServiceConfig.Builder>
    • mergeFrom

      public MetricsServiceConfig.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<MetricsServiceConfig.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<MetricsServiceConfig.Builder>
    • mergeFrom

      public MetricsServiceConfig.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<MetricsServiceConfig.Builder>
      Throws:
      IOException
    • hasGrpcService

      public boolean hasGrpcService()
       The upstream gRPC cluster that hosts the metrics service.
       
      .envoy.config.core.v3.GrpcService grpc_service = 1 [(.validate.rules) = { ... }
      Specified by:
      hasGrpcService in interface MetricsServiceConfigOrBuilder
      Returns:
      Whether the grpcService field is set.
    • getGrpcService

      public GrpcService getGrpcService()
       The upstream gRPC cluster that hosts the metrics service.
       
      .envoy.config.core.v3.GrpcService grpc_service = 1 [(.validate.rules) = { ... }
      Specified by:
      getGrpcService in interface MetricsServiceConfigOrBuilder
      Returns:
      The grpcService.
    • setGrpcService

      public MetricsServiceConfig.Builder setGrpcService(GrpcService value)
       The upstream gRPC cluster that hosts the metrics service.
       
      .envoy.config.core.v3.GrpcService grpc_service = 1 [(.validate.rules) = { ... }
    • setGrpcService

      public MetricsServiceConfig.Builder setGrpcService(GrpcService.Builder builderForValue)
       The upstream gRPC cluster that hosts the metrics service.
       
      .envoy.config.core.v3.GrpcService grpc_service = 1 [(.validate.rules) = { ... }
    • mergeGrpcService

      public MetricsServiceConfig.Builder mergeGrpcService(GrpcService value)
       The upstream gRPC cluster that hosts the metrics service.
       
      .envoy.config.core.v3.GrpcService grpc_service = 1 [(.validate.rules) = { ... }
    • clearGrpcService

      public MetricsServiceConfig.Builder clearGrpcService()
       The upstream gRPC cluster that hosts the metrics service.
       
      .envoy.config.core.v3.GrpcService grpc_service = 1 [(.validate.rules) = { ... }
    • getGrpcServiceBuilder

      public GrpcService.Builder getGrpcServiceBuilder()
       The upstream gRPC cluster that hosts the metrics service.
       
      .envoy.config.core.v3.GrpcService grpc_service = 1 [(.validate.rules) = { ... }
    • getGrpcServiceOrBuilder

      public GrpcServiceOrBuilder getGrpcServiceOrBuilder()
       The upstream gRPC cluster that hosts the metrics service.
       
      .envoy.config.core.v3.GrpcService grpc_service = 1 [(.validate.rules) = { ... }
      Specified by:
      getGrpcServiceOrBuilder in interface MetricsServiceConfigOrBuilder
    • getTransportApiVersionValue

      public int getTransportApiVersionValue()
       API version for metric service transport protocol. This describes the metric service gRPC
       endpoint and version of messages used on the wire.
       
      .envoy.config.core.v3.ApiVersion transport_api_version = 3 [(.validate.rules) = { ... }
      Specified by:
      getTransportApiVersionValue in interface MetricsServiceConfigOrBuilder
      Returns:
      The enum numeric value on the wire for transportApiVersion.
    • setTransportApiVersionValue

      public MetricsServiceConfig.Builder setTransportApiVersionValue(int value)
       API version for metric service transport protocol. This describes the metric service gRPC
       endpoint and version of messages used on the wire.
       
      .envoy.config.core.v3.ApiVersion transport_api_version = 3 [(.validate.rules) = { ... }
      Parameters:
      value - The enum numeric value on the wire for transportApiVersion to set.
      Returns:
      This builder for chaining.
    • getTransportApiVersion

      public ApiVersion getTransportApiVersion()
       API version for metric service transport protocol. This describes the metric service gRPC
       endpoint and version of messages used on the wire.
       
      .envoy.config.core.v3.ApiVersion transport_api_version = 3 [(.validate.rules) = { ... }
      Specified by:
      getTransportApiVersion in interface MetricsServiceConfigOrBuilder
      Returns:
      The transportApiVersion.
    • setTransportApiVersion

      public MetricsServiceConfig.Builder setTransportApiVersion(ApiVersion value)
       API version for metric service transport protocol. This describes the metric service gRPC
       endpoint and version of messages used on the wire.
       
      .envoy.config.core.v3.ApiVersion transport_api_version = 3 [(.validate.rules) = { ... }
      Parameters:
      value - The transportApiVersion to set.
      Returns:
      This builder for chaining.
    • clearTransportApiVersion

      public MetricsServiceConfig.Builder clearTransportApiVersion()
       API version for metric service transport protocol. This describes the metric service gRPC
       endpoint and version of messages used on the wire.
       
      .envoy.config.core.v3.ApiVersion transport_api_version = 3 [(.validate.rules) = { ... }
      Returns:
      This builder for chaining.
    • hasReportCountersAsDeltas

      public boolean hasReportCountersAsDeltas()
       If true, counters are reported as the delta between flushing intervals. Otherwise, the current
       counter value is reported. Defaults to false.
       Eventually (https://github.com/envoyproxy/envoy/issues/10968) if this value is not set, the
       sink will take updates from the :ref:`MetricsResponse <envoy_v3_api_msg_service.metrics.v3.StreamMetricsResponse>`.
       
      .google.protobuf.BoolValue report_counters_as_deltas = 2;
      Specified by:
      hasReportCountersAsDeltas in interface MetricsServiceConfigOrBuilder
      Returns:
      Whether the reportCountersAsDeltas field is set.
    • getReportCountersAsDeltas

      public com.google.protobuf.BoolValue getReportCountersAsDeltas()
       If true, counters are reported as the delta between flushing intervals. Otherwise, the current
       counter value is reported. Defaults to false.
       Eventually (https://github.com/envoyproxy/envoy/issues/10968) if this value is not set, the
       sink will take updates from the :ref:`MetricsResponse <envoy_v3_api_msg_service.metrics.v3.StreamMetricsResponse>`.
       
      .google.protobuf.BoolValue report_counters_as_deltas = 2;
      Specified by:
      getReportCountersAsDeltas in interface MetricsServiceConfigOrBuilder
      Returns:
      The reportCountersAsDeltas.
    • setReportCountersAsDeltas

      public MetricsServiceConfig.Builder setReportCountersAsDeltas(com.google.protobuf.BoolValue value)
       If true, counters are reported as the delta between flushing intervals. Otherwise, the current
       counter value is reported. Defaults to false.
       Eventually (https://github.com/envoyproxy/envoy/issues/10968) if this value is not set, the
       sink will take updates from the :ref:`MetricsResponse <envoy_v3_api_msg_service.metrics.v3.StreamMetricsResponse>`.
       
      .google.protobuf.BoolValue report_counters_as_deltas = 2;
    • setReportCountersAsDeltas

      public MetricsServiceConfig.Builder setReportCountersAsDeltas(com.google.protobuf.BoolValue.Builder builderForValue)
       If true, counters are reported as the delta between flushing intervals. Otherwise, the current
       counter value is reported. Defaults to false.
       Eventually (https://github.com/envoyproxy/envoy/issues/10968) if this value is not set, the
       sink will take updates from the :ref:`MetricsResponse <envoy_v3_api_msg_service.metrics.v3.StreamMetricsResponse>`.
       
      .google.protobuf.BoolValue report_counters_as_deltas = 2;
    • mergeReportCountersAsDeltas

      public MetricsServiceConfig.Builder mergeReportCountersAsDeltas(com.google.protobuf.BoolValue value)
       If true, counters are reported as the delta between flushing intervals. Otherwise, the current
       counter value is reported. Defaults to false.
       Eventually (https://github.com/envoyproxy/envoy/issues/10968) if this value is not set, the
       sink will take updates from the :ref:`MetricsResponse <envoy_v3_api_msg_service.metrics.v3.StreamMetricsResponse>`.
       
      .google.protobuf.BoolValue report_counters_as_deltas = 2;
    • clearReportCountersAsDeltas

      public MetricsServiceConfig.Builder clearReportCountersAsDeltas()
       If true, counters are reported as the delta between flushing intervals. Otherwise, the current
       counter value is reported. Defaults to false.
       Eventually (https://github.com/envoyproxy/envoy/issues/10968) if this value is not set, the
       sink will take updates from the :ref:`MetricsResponse <envoy_v3_api_msg_service.metrics.v3.StreamMetricsResponse>`.
       
      .google.protobuf.BoolValue report_counters_as_deltas = 2;
    • getReportCountersAsDeltasBuilder

      public com.google.protobuf.BoolValue.Builder getReportCountersAsDeltasBuilder()
       If true, counters are reported as the delta between flushing intervals. Otherwise, the current
       counter value is reported. Defaults to false.
       Eventually (https://github.com/envoyproxy/envoy/issues/10968) if this value is not set, the
       sink will take updates from the :ref:`MetricsResponse <envoy_v3_api_msg_service.metrics.v3.StreamMetricsResponse>`.
       
      .google.protobuf.BoolValue report_counters_as_deltas = 2;
    • getReportCountersAsDeltasOrBuilder

      public com.google.protobuf.BoolValueOrBuilder getReportCountersAsDeltasOrBuilder()
       If true, counters are reported as the delta between flushing intervals. Otherwise, the current
       counter value is reported. Defaults to false.
       Eventually (https://github.com/envoyproxy/envoy/issues/10968) if this value is not set, the
       sink will take updates from the :ref:`MetricsResponse <envoy_v3_api_msg_service.metrics.v3.StreamMetricsResponse>`.
       
      .google.protobuf.BoolValue report_counters_as_deltas = 2;
      Specified by:
      getReportCountersAsDeltasOrBuilder in interface MetricsServiceConfigOrBuilder
    • getEmitTagsAsLabels

      public boolean getEmitTagsAsLabels()
       If true, metrics will have their tags emitted as labels on the metrics objects sent to the MetricsService,
       and the tag extracted name will be used instead of the full name, which may contain values used by the tag
       extractor or additional tags added during stats creation.
       
      bool emit_tags_as_labels = 4;
      Specified by:
      getEmitTagsAsLabels in interface MetricsServiceConfigOrBuilder
      Returns:
      The emitTagsAsLabels.
    • setEmitTagsAsLabels

      public MetricsServiceConfig.Builder setEmitTagsAsLabels(boolean value)
       If true, metrics will have their tags emitted as labels on the metrics objects sent to the MetricsService,
       and the tag extracted name will be used instead of the full name, which may contain values used by the tag
       extractor or additional tags added during stats creation.
       
      bool emit_tags_as_labels = 4;
      Parameters:
      value - The emitTagsAsLabels to set.
      Returns:
      This builder for chaining.
    • clearEmitTagsAsLabels

      public MetricsServiceConfig.Builder clearEmitTagsAsLabels()
       If true, metrics will have their tags emitted as labels on the metrics objects sent to the MetricsService,
       and the tag extracted name will be used instead of the full name, which may contain values used by the tag
       extractor or additional tags added during stats creation.
       
      bool emit_tags_as_labels = 4;
      Returns:
      This builder for chaining.
    • getHistogramEmitModeValue

      public int getHistogramEmitModeValue()
       Specify which metrics types to emit for histograms. Defaults to SUMMARY_AND_HISTOGRAM.
       
      .envoy.config.metrics.v3.HistogramEmitMode histogram_emit_mode = 5 [(.validate.rules) = { ... }
      Specified by:
      getHistogramEmitModeValue in interface MetricsServiceConfigOrBuilder
      Returns:
      The enum numeric value on the wire for histogramEmitMode.
    • setHistogramEmitModeValue

      public MetricsServiceConfig.Builder setHistogramEmitModeValue(int value)
       Specify which metrics types to emit for histograms. Defaults to SUMMARY_AND_HISTOGRAM.
       
      .envoy.config.metrics.v3.HistogramEmitMode histogram_emit_mode = 5 [(.validate.rules) = { ... }
      Parameters:
      value - The enum numeric value on the wire for histogramEmitMode to set.
      Returns:
      This builder for chaining.
    • getHistogramEmitMode

      public HistogramEmitMode getHistogramEmitMode()
       Specify which metrics types to emit for histograms. Defaults to SUMMARY_AND_HISTOGRAM.
       
      .envoy.config.metrics.v3.HistogramEmitMode histogram_emit_mode = 5 [(.validate.rules) = { ... }
      Specified by:
      getHistogramEmitMode in interface MetricsServiceConfigOrBuilder
      Returns:
      The histogramEmitMode.
    • setHistogramEmitMode

      public MetricsServiceConfig.Builder setHistogramEmitMode(HistogramEmitMode value)
       Specify which metrics types to emit for histograms. Defaults to SUMMARY_AND_HISTOGRAM.
       
      .envoy.config.metrics.v3.HistogramEmitMode histogram_emit_mode = 5 [(.validate.rules) = { ... }
      Parameters:
      value - The histogramEmitMode to set.
      Returns:
      This builder for chaining.
    • clearHistogramEmitMode

      public MetricsServiceConfig.Builder clearHistogramEmitMode()
       Specify which metrics types to emit for histograms. Defaults to SUMMARY_AND_HISTOGRAM.
       
      .envoy.config.metrics.v3.HistogramEmitMode histogram_emit_mode = 5 [(.validate.rules) = { ... }
      Returns:
      This builder for chaining.
    • getBatchSize

      public int getBatchSize()
       The maximum number of metrics to send in a single gRPC message. If not set or set to 0,
       all metrics will be sent in a single message (current behavior). When set to a positive value,
       metrics will be batched into multiple messages, with each message containing at most batch_size
       metric families. This helps avoid hitting gRPC message size limits (typically 4MB) when sending
       large numbers of metrics.
       
      uint32 batch_size = 6 [(.validate.rules) = { ... }
      Specified by:
      getBatchSize in interface MetricsServiceConfigOrBuilder
      Returns:
      The batchSize.
    • setBatchSize

      public MetricsServiceConfig.Builder setBatchSize(int value)
       The maximum number of metrics to send in a single gRPC message. If not set or set to 0,
       all metrics will be sent in a single message (current behavior). When set to a positive value,
       metrics will be batched into multiple messages, with each message containing at most batch_size
       metric families. This helps avoid hitting gRPC message size limits (typically 4MB) when sending
       large numbers of metrics.
       
      uint32 batch_size = 6 [(.validate.rules) = { ... }
      Parameters:
      value - The batchSize to set.
      Returns:
      This builder for chaining.
    • clearBatchSize

      public MetricsServiceConfig.Builder clearBatchSize()
       The maximum number of metrics to send in a single gRPC message. If not set or set to 0,
       all metrics will be sent in a single message (current behavior). When set to a positive value,
       metrics will be batched into multiple messages, with each message containing at most batch_size
       metric families. This helps avoid hitting gRPC message size limits (typically 4MB) when sending
       large numbers of metrics.
       
      uint32 batch_size = 6 [(.validate.rules) = { ... }
      Returns:
      This builder for chaining.
    • setUnknownFields

      public final MetricsServiceConfig.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<MetricsServiceConfig.Builder>
    • mergeUnknownFields

      public final MetricsServiceConfig.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<MetricsServiceConfig.Builder>