Class RuntimeFilter.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<RuntimeFilter.Builder>
io.envoyproxy.envoy.config.accesslog.v3.RuntimeFilter.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,RuntimeFilterOrBuilder,Cloneable
- Enclosing class:
- RuntimeFilter
public static final class RuntimeFilter.Builder
extends com.google.protobuf.GeneratedMessageV3.Builder<RuntimeFilter.Builder>
implements RuntimeFilterOrBuilder
Filters requests based on runtime-configurable sampling rates.Protobuf type
envoy.config.accesslog.v3.RuntimeFilter-
Method Summary
Modifier and TypeMethodDescriptionaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()clear()clearField(com.google.protobuf.Descriptors.FieldDescriptor field) clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) Defines the default sampling percentage when no runtime override is present.Specifies a key used to look up a custom sampling rate from the runtime configuration.Controls how sampling decisions are madeclone()static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorDefines the default sampling percentage when no runtime override is present.Defines the default sampling percentage when no runtime override is present.Defines the default sampling percentage when no runtime override is present.Specifies a key used to look up a custom sampling rate from the runtime configuration.com.google.protobuf.ByteStringSpecifies a key used to look up a custom sampling rate from the runtime configuration.booleanControls how sampling decisions are madebooleanDefines the default sampling percentage when no runtime override is present.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeFrom(RuntimeFilter other) Defines the default sampling percentage when no runtime override is present.final RuntimeFilter.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) Defines the default sampling percentage when no runtime override is present.setPercentSampled(FractionalPercent.Builder builderForValue) Defines the default sampling percentage when no runtime override is present.setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) setRuntimeKey(String value) Specifies a key used to look up a custom sampling rate from the runtime configuration.setRuntimeKeyBytes(com.google.protobuf.ByteString value) Specifies a key used to look up a custom sampling rate from the runtime configuration.final RuntimeFilter.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) setUseIndependentRandomness(boolean value) Controls how sampling decisions are madeMethods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<RuntimeFilter.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<RuntimeFilter.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<RuntimeFilter.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<RuntimeFilter.Builder>
-
setField
public RuntimeFilter.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<RuntimeFilter.Builder>
-
clearField
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<RuntimeFilter.Builder>
-
clearOneof
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<RuntimeFilter.Builder>
-
setRepeatedField
public RuntimeFilter.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<RuntimeFilter.Builder>
-
addRepeatedField
public RuntimeFilter.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<RuntimeFilter.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<RuntimeFilter.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<RuntimeFilter.Builder>
-
mergeFrom
public RuntimeFilter.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<RuntimeFilter.Builder>- Throws:
IOException
-
getRuntimeKey
Specifies a key used to look up a custom sampling rate from the runtime configuration. If a value is found for this key, it will override the default sampling rate specified in ``percent_sampled``.
string runtime_key = 1 [(.validate.rules) = { ... }- Specified by:
getRuntimeKeyin interfaceRuntimeFilterOrBuilder- Returns:
- The runtimeKey.
-
getRuntimeKeyBytes
public com.google.protobuf.ByteString getRuntimeKeyBytes()Specifies a key used to look up a custom sampling rate from the runtime configuration. If a value is found for this key, it will override the default sampling rate specified in ``percent_sampled``.
string runtime_key = 1 [(.validate.rules) = { ... }- Specified by:
getRuntimeKeyBytesin interfaceRuntimeFilterOrBuilder- Returns:
- The bytes for runtimeKey.
-
setRuntimeKey
Specifies a key used to look up a custom sampling rate from the runtime configuration. If a value is found for this key, it will override the default sampling rate specified in ``percent_sampled``.
string runtime_key = 1 [(.validate.rules) = { ... }- Parameters:
value- The runtimeKey to set.- Returns:
- This builder for chaining.
-
clearRuntimeKey
Specifies a key used to look up a custom sampling rate from the runtime configuration. If a value is found for this key, it will override the default sampling rate specified in ``percent_sampled``.
string runtime_key = 1 [(.validate.rules) = { ... }- Returns:
- This builder for chaining.
-
setRuntimeKeyBytes
Specifies a key used to look up a custom sampling rate from the runtime configuration. If a value is found for this key, it will override the default sampling rate specified in ``percent_sampled``.
string runtime_key = 1 [(.validate.rules) = { ... }- Parameters:
value- The bytes for runtimeKey to set.- Returns:
- This builder for chaining.
-
hasPercentSampled
public boolean hasPercentSampled()Defines the default sampling percentage when no runtime override is present. If not specified, the default is **0%** (with a denominator of 100).
.envoy.type.v3.FractionalPercent percent_sampled = 2;- Specified by:
hasPercentSampledin interfaceRuntimeFilterOrBuilder- Returns:
- Whether the percentSampled field is set.
-
getPercentSampled
Defines the default sampling percentage when no runtime override is present. If not specified, the default is **0%** (with a denominator of 100).
.envoy.type.v3.FractionalPercent percent_sampled = 2;- Specified by:
getPercentSampledin interfaceRuntimeFilterOrBuilder- Returns:
- The percentSampled.
-
setPercentSampled
Defines the default sampling percentage when no runtime override is present. If not specified, the default is **0%** (with a denominator of 100).
.envoy.type.v3.FractionalPercent percent_sampled = 2; -
setPercentSampled
Defines the default sampling percentage when no runtime override is present. If not specified, the default is **0%** (with a denominator of 100).
.envoy.type.v3.FractionalPercent percent_sampled = 2; -
mergePercentSampled
Defines the default sampling percentage when no runtime override is present. If not specified, the default is **0%** (with a denominator of 100).
.envoy.type.v3.FractionalPercent percent_sampled = 2; -
clearPercentSampled
Defines the default sampling percentage when no runtime override is present. If not specified, the default is **0%** (with a denominator of 100).
.envoy.type.v3.FractionalPercent percent_sampled = 2; -
getPercentSampledBuilder
Defines the default sampling percentage when no runtime override is present. If not specified, the default is **0%** (with a denominator of 100).
.envoy.type.v3.FractionalPercent percent_sampled = 2; -
getPercentSampledOrBuilder
Defines the default sampling percentage when no runtime override is present. If not specified, the default is **0%** (with a denominator of 100).
.envoy.type.v3.FractionalPercent percent_sampled = 2;- Specified by:
getPercentSampledOrBuilderin interfaceRuntimeFilterOrBuilder
-
getUseIndependentRandomness
public boolean getUseIndependentRandomness()Controls how sampling decisions are made. - Default behavior (``false``): * Uses the :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` as a consistent sampling pivot. * When :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` is present, sampling will be consistent across multiple hosts based on both the ``runtime_key`` and :ref:`x-request-id<config_http_conn_man_headers_x-request-id>`. * Useful for tracking related requests across a distributed system. - When set to ``true`` or :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` is missing: * Sampling decisions are made randomly based only on the ``runtime_key``. * Useful in complex filter configurations (like nested :ref:`AndFilter<envoy_v3_api_msg_config.accesslog.v3.AndFilter>`/ :ref:`OrFilter<envoy_v3_api_msg_config.accesslog.v3.OrFilter>` blocks) where independent probability calculations are desired. * Can be used to implement logging kill switches with predictable probability distributions.bool use_independent_randomness = 3;- Specified by:
getUseIndependentRandomnessin interfaceRuntimeFilterOrBuilder- Returns:
- The useIndependentRandomness.
-
setUseIndependentRandomness
Controls how sampling decisions are made. - Default behavior (``false``): * Uses the :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` as a consistent sampling pivot. * When :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` is present, sampling will be consistent across multiple hosts based on both the ``runtime_key`` and :ref:`x-request-id<config_http_conn_man_headers_x-request-id>`. * Useful for tracking related requests across a distributed system. - When set to ``true`` or :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` is missing: * Sampling decisions are made randomly based only on the ``runtime_key``. * Useful in complex filter configurations (like nested :ref:`AndFilter<envoy_v3_api_msg_config.accesslog.v3.AndFilter>`/ :ref:`OrFilter<envoy_v3_api_msg_config.accesslog.v3.OrFilter>` blocks) where independent probability calculations are desired. * Can be used to implement logging kill switches with predictable probability distributions.bool use_independent_randomness = 3;- Parameters:
value- The useIndependentRandomness to set.- Returns:
- This builder for chaining.
-
clearUseIndependentRandomness
Controls how sampling decisions are made. - Default behavior (``false``): * Uses the :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` as a consistent sampling pivot. * When :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` is present, sampling will be consistent across multiple hosts based on both the ``runtime_key`` and :ref:`x-request-id<config_http_conn_man_headers_x-request-id>`. * Useful for tracking related requests across a distributed system. - When set to ``true`` or :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` is missing: * Sampling decisions are made randomly based only on the ``runtime_key``. * Useful in complex filter configurations (like nested :ref:`AndFilter<envoy_v3_api_msg_config.accesslog.v3.AndFilter>`/ :ref:`OrFilter<envoy_v3_api_msg_config.accesslog.v3.OrFilter>` blocks) where independent probability calculations are desired. * Can be used to implement logging kill switches with predictable probability distributions.bool use_independent_randomness = 3;- Returns:
- This builder for chaining.
-
setUnknownFields
public final RuntimeFilter.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<RuntimeFilter.Builder>
-
mergeUnknownFields
public final RuntimeFilter.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<RuntimeFilter.Builder>
-