Class TagSpecifier.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderType>
-
- com.google.protobuf.GeneratedMessageV3.Builder<TagSpecifier.Builder>
-
- io.envoyproxy.envoy.config.metrics.v2.TagSpecifier.Builder
-
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,TagSpecifierOrBuilder,Cloneable
- Enclosing class:
- TagSpecifier
public static final class TagSpecifier.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<TagSpecifier.Builder> implements TagSpecifierOrBuilder
Designates a tag name and value pair. The value may be either a fixed value or a regex providing the value via capture groups. The specified tag will be unconditionally set if a fixed value, otherwise it will only be set if one or more capture groups in the regex match.
Protobuf typeenvoy.config.metrics.v2.TagSpecifier
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TagSpecifier.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)TagSpecifierbuild()TagSpecifierbuildPartial()TagSpecifier.Builderclear()TagSpecifier.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)TagSpecifier.BuilderclearFixedValue()Specifies a fixed tag value for the ``tag_name``.TagSpecifier.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)TagSpecifier.BuilderclearRegex()Designates a tag to strip from the tag extracted name and provide as a named tag value for all statistics.TagSpecifier.BuilderclearTagName()Attaches an identifier to the tag values to identify the tag being in the sink.TagSpecifier.BuilderclearTagValue()TagSpecifier.Builderclone()TagSpecifiergetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()StringgetFixedValue()Specifies a fixed tag value for the ``tag_name``.com.google.protobuf.ByteStringgetFixedValueBytes()Specifies a fixed tag value for the ``tag_name``.StringgetRegex()Designates a tag to strip from the tag extracted name and provide as a named tag value for all statistics.com.google.protobuf.ByteStringgetRegexBytes()Designates a tag to strip from the tag extracted name and provide as a named tag value for all statistics.StringgetTagName()Attaches an identifier to the tag values to identify the tag being in the sink.com.google.protobuf.ByteStringgetTagNameBytes()Attaches an identifier to the tag values to identify the tag being in the sink.TagSpecifier.TagValueCasegetTagValueCase()booleanhasFixedValue()Specifies a fixed tag value for the ``tag_name``.booleanhasRegex()Designates a tag to strip from the tag extracted name and provide as a named tag value for all statistics.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()TagSpecifier.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)TagSpecifier.BuildermergeFrom(com.google.protobuf.Message other)TagSpecifier.BuildermergeFrom(TagSpecifier other)TagSpecifier.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)TagSpecifier.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)TagSpecifier.BuildersetFixedValue(String value)Specifies a fixed tag value for the ``tag_name``.TagSpecifier.BuildersetFixedValueBytes(com.google.protobuf.ByteString value)Specifies a fixed tag value for the ``tag_name``.TagSpecifier.BuildersetRegex(String value)Designates a tag to strip from the tag extracted name and provide as a named tag value for all statistics.TagSpecifier.BuildersetRegexBytes(com.google.protobuf.ByteString value)Designates a tag to strip from the tag extracted name and provide as a named tag value for all statistics.TagSpecifier.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)TagSpecifier.BuildersetTagName(String value)Attaches an identifier to the tag values to identify the tag being in the sink.TagSpecifier.BuildersetTagNameBytes(com.google.protobuf.ByteString value)Attaches an identifier to the tag values to identify the tag being in the sink.TagSpecifier.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
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<TagSpecifier.Builder>
-
clear
public TagSpecifier.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<TagSpecifier.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<TagSpecifier.Builder>
-
getDefaultInstanceForType
public TagSpecifier getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public TagSpecifier build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public TagSpecifier buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public TagSpecifier.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<TagSpecifier.Builder>
-
setField
public TagSpecifier.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<TagSpecifier.Builder>
-
clearField
public TagSpecifier.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<TagSpecifier.Builder>
-
clearOneof
public TagSpecifier.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<TagSpecifier.Builder>
-
setRepeatedField
public TagSpecifier.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<TagSpecifier.Builder>
-
addRepeatedField
public TagSpecifier.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<TagSpecifier.Builder>
-
mergeFrom
public TagSpecifier.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<TagSpecifier.Builder>
-
mergeFrom
public TagSpecifier.Builder mergeFrom(TagSpecifier other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<TagSpecifier.Builder>
-
mergeFrom
public TagSpecifier.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<TagSpecifier.Builder>- Throws:
IOException
-
getTagValueCase
public TagSpecifier.TagValueCase getTagValueCase()
- Specified by:
getTagValueCasein interfaceTagSpecifierOrBuilder
-
clearTagValue
public TagSpecifier.Builder clearTagValue()
-
getTagName
public String getTagName()
Attaches an identifier to the tag values to identify the tag being in the sink. Envoy has a set of default names and regexes to extract dynamic portions of existing stats, which can be found in :repo:`well_known_names.h <source/common/config/well_known_names.h>` in the Envoy repository. If a :ref:`tag_name <envoy_api_field_config.metrics.v2.TagSpecifier.tag_name>` is provided in the config and neither :ref:`regex <envoy_api_field_config.metrics.v2.TagSpecifier.regex>` or :ref:`fixed_value <envoy_api_field_config.metrics.v2.TagSpecifier.fixed_value>` were specified, Envoy will attempt to find that name in its set of defaults and use the accompanying regex. .. note:: It is invalid to specify the same tag name twice in a config.
string tag_name = 1;- Specified by:
getTagNamein interfaceTagSpecifierOrBuilder- Returns:
- The tagName.
-
getTagNameBytes
public com.google.protobuf.ByteString getTagNameBytes()
Attaches an identifier to the tag values to identify the tag being in the sink. Envoy has a set of default names and regexes to extract dynamic portions of existing stats, which can be found in :repo:`well_known_names.h <source/common/config/well_known_names.h>` in the Envoy repository. If a :ref:`tag_name <envoy_api_field_config.metrics.v2.TagSpecifier.tag_name>` is provided in the config and neither :ref:`regex <envoy_api_field_config.metrics.v2.TagSpecifier.regex>` or :ref:`fixed_value <envoy_api_field_config.metrics.v2.TagSpecifier.fixed_value>` were specified, Envoy will attempt to find that name in its set of defaults and use the accompanying regex. .. note:: It is invalid to specify the same tag name twice in a config.
string tag_name = 1;- Specified by:
getTagNameBytesin interfaceTagSpecifierOrBuilder- Returns:
- The bytes for tagName.
-
setTagName
public TagSpecifier.Builder setTagName(String value)
Attaches an identifier to the tag values to identify the tag being in the sink. Envoy has a set of default names and regexes to extract dynamic portions of existing stats, which can be found in :repo:`well_known_names.h <source/common/config/well_known_names.h>` in the Envoy repository. If a :ref:`tag_name <envoy_api_field_config.metrics.v2.TagSpecifier.tag_name>` is provided in the config and neither :ref:`regex <envoy_api_field_config.metrics.v2.TagSpecifier.regex>` or :ref:`fixed_value <envoy_api_field_config.metrics.v2.TagSpecifier.fixed_value>` were specified, Envoy will attempt to find that name in its set of defaults and use the accompanying regex. .. note:: It is invalid to specify the same tag name twice in a config.
string tag_name = 1;- Parameters:
value- The tagName to set.- Returns:
- This builder for chaining.
-
clearTagName
public TagSpecifier.Builder clearTagName()
Attaches an identifier to the tag values to identify the tag being in the sink. Envoy has a set of default names and regexes to extract dynamic portions of existing stats, which can be found in :repo:`well_known_names.h <source/common/config/well_known_names.h>` in the Envoy repository. If a :ref:`tag_name <envoy_api_field_config.metrics.v2.TagSpecifier.tag_name>` is provided in the config and neither :ref:`regex <envoy_api_field_config.metrics.v2.TagSpecifier.regex>` or :ref:`fixed_value <envoy_api_field_config.metrics.v2.TagSpecifier.fixed_value>` were specified, Envoy will attempt to find that name in its set of defaults and use the accompanying regex. .. note:: It is invalid to specify the same tag name twice in a config.
string tag_name = 1;- Returns:
- This builder for chaining.
-
setTagNameBytes
public TagSpecifier.Builder setTagNameBytes(com.google.protobuf.ByteString value)
Attaches an identifier to the tag values to identify the tag being in the sink. Envoy has a set of default names and regexes to extract dynamic portions of existing stats, which can be found in :repo:`well_known_names.h <source/common/config/well_known_names.h>` in the Envoy repository. If a :ref:`tag_name <envoy_api_field_config.metrics.v2.TagSpecifier.tag_name>` is provided in the config and neither :ref:`regex <envoy_api_field_config.metrics.v2.TagSpecifier.regex>` or :ref:`fixed_value <envoy_api_field_config.metrics.v2.TagSpecifier.fixed_value>` were specified, Envoy will attempt to find that name in its set of defaults and use the accompanying regex. .. note:: It is invalid to specify the same tag name twice in a config.
string tag_name = 1;- Parameters:
value- The bytes for tagName to set.- Returns:
- This builder for chaining.
-
hasRegex
public boolean hasRegex()
Designates a tag to strip from the tag extracted name and provide as a named tag value for all statistics. This will only occur if any part of the name matches the regex provided with one or more capture groups. The first capture group identifies the portion of the name to remove. The second capture group (which will normally be nested inside the first) will designate the value of the tag for the statistic. If no second capture group is provided, the first will also be used to set the value of the tag. All other capture groups will be ignored. Example 1. a stat name ``cluster.foo_cluster.upstream_rq_timeout`` and one tag specifier: .. code-block:: json { "tag_name": "envoy.cluster_name", "regex": "^cluster\\.((.+?)\\.)" } Note that the regex will remove ``foo_cluster.`` making the tag extracted name ``cluster.upstream_rq_timeout`` and the tag value for ``envoy.cluster_name`` will be ``foo_cluster`` (note: there will be no ``.`` character because of the second capture group). Example 2. a stat name ``http.connection_manager_1.user_agent.ios.downstream_cx_total`` and two tag specifiers: .. code-block:: json [ { "tag_name": "envoy.http_user_agent", "regex": "^http(?=\\.).*?\\.user_agent\\.((.+?)\\.)\\w+?$" }, { "tag_name": "envoy.http_conn_manager_prefix", "regex": "^http\\.((.*?)\\.)" } ] The two regexes of the specifiers will be processed in the definition order. The first regex will remove ``ios.``, leaving the tag extracted name ``http.connection_manager_1.user_agent.downstream_cx_total``. The tag ``envoy.http_user_agent`` will be added with tag value ``ios``. The second regex will remove ``connection_manager_1.`` from the tag extracted name produced by the first regex ``http.connection_manager_1.user_agent.downstream_cx_total``, leaving ``http.user_agent.downstream_cx_total`` as the tag extracted name. The tag ``envoy.http_conn_manager_prefix`` will be added with the tag value ``connection_manager_1``.string regex = 2 [(.validate.rules) = { ... }- Specified by:
hasRegexin interfaceTagSpecifierOrBuilder- Returns:
- Whether the regex field is set.
-
getRegex
public String getRegex()
Designates a tag to strip from the tag extracted name and provide as a named tag value for all statistics. This will only occur if any part of the name matches the regex provided with one or more capture groups. The first capture group identifies the portion of the name to remove. The second capture group (which will normally be nested inside the first) will designate the value of the tag for the statistic. If no second capture group is provided, the first will also be used to set the value of the tag. All other capture groups will be ignored. Example 1. a stat name ``cluster.foo_cluster.upstream_rq_timeout`` and one tag specifier: .. code-block:: json { "tag_name": "envoy.cluster_name", "regex": "^cluster\\.((.+?)\\.)" } Note that the regex will remove ``foo_cluster.`` making the tag extracted name ``cluster.upstream_rq_timeout`` and the tag value for ``envoy.cluster_name`` will be ``foo_cluster`` (note: there will be no ``.`` character because of the second capture group). Example 2. a stat name ``http.connection_manager_1.user_agent.ios.downstream_cx_total`` and two tag specifiers: .. code-block:: json [ { "tag_name": "envoy.http_user_agent", "regex": "^http(?=\\.).*?\\.user_agent\\.((.+?)\\.)\\w+?$" }, { "tag_name": "envoy.http_conn_manager_prefix", "regex": "^http\\.((.*?)\\.)" } ] The two regexes of the specifiers will be processed in the definition order. The first regex will remove ``ios.``, leaving the tag extracted name ``http.connection_manager_1.user_agent.downstream_cx_total``. The tag ``envoy.http_user_agent`` will be added with tag value ``ios``. The second regex will remove ``connection_manager_1.`` from the tag extracted name produced by the first regex ``http.connection_manager_1.user_agent.downstream_cx_total``, leaving ``http.user_agent.downstream_cx_total`` as the tag extracted name. The tag ``envoy.http_conn_manager_prefix`` will be added with the tag value ``connection_manager_1``.string regex = 2 [(.validate.rules) = { ... }- Specified by:
getRegexin interfaceTagSpecifierOrBuilder- Returns:
- The regex.
-
getRegexBytes
public com.google.protobuf.ByteString getRegexBytes()
Designates a tag to strip from the tag extracted name and provide as a named tag value for all statistics. This will only occur if any part of the name matches the regex provided with one or more capture groups. The first capture group identifies the portion of the name to remove. The second capture group (which will normally be nested inside the first) will designate the value of the tag for the statistic. If no second capture group is provided, the first will also be used to set the value of the tag. All other capture groups will be ignored. Example 1. a stat name ``cluster.foo_cluster.upstream_rq_timeout`` and one tag specifier: .. code-block:: json { "tag_name": "envoy.cluster_name", "regex": "^cluster\\.((.+?)\\.)" } Note that the regex will remove ``foo_cluster.`` making the tag extracted name ``cluster.upstream_rq_timeout`` and the tag value for ``envoy.cluster_name`` will be ``foo_cluster`` (note: there will be no ``.`` character because of the second capture group). Example 2. a stat name ``http.connection_manager_1.user_agent.ios.downstream_cx_total`` and two tag specifiers: .. code-block:: json [ { "tag_name": "envoy.http_user_agent", "regex": "^http(?=\\.).*?\\.user_agent\\.((.+?)\\.)\\w+?$" }, { "tag_name": "envoy.http_conn_manager_prefix", "regex": "^http\\.((.*?)\\.)" } ] The two regexes of the specifiers will be processed in the definition order. The first regex will remove ``ios.``, leaving the tag extracted name ``http.connection_manager_1.user_agent.downstream_cx_total``. The tag ``envoy.http_user_agent`` will be added with tag value ``ios``. The second regex will remove ``connection_manager_1.`` from the tag extracted name produced by the first regex ``http.connection_manager_1.user_agent.downstream_cx_total``, leaving ``http.user_agent.downstream_cx_total`` as the tag extracted name. The tag ``envoy.http_conn_manager_prefix`` will be added with the tag value ``connection_manager_1``.string regex = 2 [(.validate.rules) = { ... }- Specified by:
getRegexBytesin interfaceTagSpecifierOrBuilder- Returns:
- The bytes for regex.
-
setRegex
public TagSpecifier.Builder setRegex(String value)
Designates a tag to strip from the tag extracted name and provide as a named tag value for all statistics. This will only occur if any part of the name matches the regex provided with one or more capture groups. The first capture group identifies the portion of the name to remove. The second capture group (which will normally be nested inside the first) will designate the value of the tag for the statistic. If no second capture group is provided, the first will also be used to set the value of the tag. All other capture groups will be ignored. Example 1. a stat name ``cluster.foo_cluster.upstream_rq_timeout`` and one tag specifier: .. code-block:: json { "tag_name": "envoy.cluster_name", "regex": "^cluster\\.((.+?)\\.)" } Note that the regex will remove ``foo_cluster.`` making the tag extracted name ``cluster.upstream_rq_timeout`` and the tag value for ``envoy.cluster_name`` will be ``foo_cluster`` (note: there will be no ``.`` character because of the second capture group). Example 2. a stat name ``http.connection_manager_1.user_agent.ios.downstream_cx_total`` and two tag specifiers: .. code-block:: json [ { "tag_name": "envoy.http_user_agent", "regex": "^http(?=\\.).*?\\.user_agent\\.((.+?)\\.)\\w+?$" }, { "tag_name": "envoy.http_conn_manager_prefix", "regex": "^http\\.((.*?)\\.)" } ] The two regexes of the specifiers will be processed in the definition order. The first regex will remove ``ios.``, leaving the tag extracted name ``http.connection_manager_1.user_agent.downstream_cx_total``. The tag ``envoy.http_user_agent`` will be added with tag value ``ios``. The second regex will remove ``connection_manager_1.`` from the tag extracted name produced by the first regex ``http.connection_manager_1.user_agent.downstream_cx_total``, leaving ``http.user_agent.downstream_cx_total`` as the tag extracted name. The tag ``envoy.http_conn_manager_prefix`` will be added with the tag value ``connection_manager_1``.string regex = 2 [(.validate.rules) = { ... }- Parameters:
value- The regex to set.- Returns:
- This builder for chaining.
-
clearRegex
public TagSpecifier.Builder clearRegex()
Designates a tag to strip from the tag extracted name and provide as a named tag value for all statistics. This will only occur if any part of the name matches the regex provided with one or more capture groups. The first capture group identifies the portion of the name to remove. The second capture group (which will normally be nested inside the first) will designate the value of the tag for the statistic. If no second capture group is provided, the first will also be used to set the value of the tag. All other capture groups will be ignored. Example 1. a stat name ``cluster.foo_cluster.upstream_rq_timeout`` and one tag specifier: .. code-block:: json { "tag_name": "envoy.cluster_name", "regex": "^cluster\\.((.+?)\\.)" } Note that the regex will remove ``foo_cluster.`` making the tag extracted name ``cluster.upstream_rq_timeout`` and the tag value for ``envoy.cluster_name`` will be ``foo_cluster`` (note: there will be no ``.`` character because of the second capture group). Example 2. a stat name ``http.connection_manager_1.user_agent.ios.downstream_cx_total`` and two tag specifiers: .. code-block:: json [ { "tag_name": "envoy.http_user_agent", "regex": "^http(?=\\.).*?\\.user_agent\\.((.+?)\\.)\\w+?$" }, { "tag_name": "envoy.http_conn_manager_prefix", "regex": "^http\\.((.*?)\\.)" } ] The two regexes of the specifiers will be processed in the definition order. The first regex will remove ``ios.``, leaving the tag extracted name ``http.connection_manager_1.user_agent.downstream_cx_total``. The tag ``envoy.http_user_agent`` will be added with tag value ``ios``. The second regex will remove ``connection_manager_1.`` from the tag extracted name produced by the first regex ``http.connection_manager_1.user_agent.downstream_cx_total``, leaving ``http.user_agent.downstream_cx_total`` as the tag extracted name. The tag ``envoy.http_conn_manager_prefix`` will be added with the tag value ``connection_manager_1``.string regex = 2 [(.validate.rules) = { ... }- Returns:
- This builder for chaining.
-
setRegexBytes
public TagSpecifier.Builder setRegexBytes(com.google.protobuf.ByteString value)
Designates a tag to strip from the tag extracted name and provide as a named tag value for all statistics. This will only occur if any part of the name matches the regex provided with one or more capture groups. The first capture group identifies the portion of the name to remove. The second capture group (which will normally be nested inside the first) will designate the value of the tag for the statistic. If no second capture group is provided, the first will also be used to set the value of the tag. All other capture groups will be ignored. Example 1. a stat name ``cluster.foo_cluster.upstream_rq_timeout`` and one tag specifier: .. code-block:: json { "tag_name": "envoy.cluster_name", "regex": "^cluster\\.((.+?)\\.)" } Note that the regex will remove ``foo_cluster.`` making the tag extracted name ``cluster.upstream_rq_timeout`` and the tag value for ``envoy.cluster_name`` will be ``foo_cluster`` (note: there will be no ``.`` character because of the second capture group). Example 2. a stat name ``http.connection_manager_1.user_agent.ios.downstream_cx_total`` and two tag specifiers: .. code-block:: json [ { "tag_name": "envoy.http_user_agent", "regex": "^http(?=\\.).*?\\.user_agent\\.((.+?)\\.)\\w+?$" }, { "tag_name": "envoy.http_conn_manager_prefix", "regex": "^http\\.((.*?)\\.)" } ] The two regexes of the specifiers will be processed in the definition order. The first regex will remove ``ios.``, leaving the tag extracted name ``http.connection_manager_1.user_agent.downstream_cx_total``. The tag ``envoy.http_user_agent`` will be added with tag value ``ios``. The second regex will remove ``connection_manager_1.`` from the tag extracted name produced by the first regex ``http.connection_manager_1.user_agent.downstream_cx_total``, leaving ``http.user_agent.downstream_cx_total`` as the tag extracted name. The tag ``envoy.http_conn_manager_prefix`` will be added with the tag value ``connection_manager_1``.string regex = 2 [(.validate.rules) = { ... }- Parameters:
value- The bytes for regex to set.- Returns:
- This builder for chaining.
-
hasFixedValue
public boolean hasFixedValue()
Specifies a fixed tag value for the ``tag_name``.
string fixed_value = 3;- Specified by:
hasFixedValuein interfaceTagSpecifierOrBuilder- Returns:
- Whether the fixedValue field is set.
-
getFixedValue
public String getFixedValue()
Specifies a fixed tag value for the ``tag_name``.
string fixed_value = 3;- Specified by:
getFixedValuein interfaceTagSpecifierOrBuilder- Returns:
- The fixedValue.
-
getFixedValueBytes
public com.google.protobuf.ByteString getFixedValueBytes()
Specifies a fixed tag value for the ``tag_name``.
string fixed_value = 3;- Specified by:
getFixedValueBytesin interfaceTagSpecifierOrBuilder- Returns:
- The bytes for fixedValue.
-
setFixedValue
public TagSpecifier.Builder setFixedValue(String value)
Specifies a fixed tag value for the ``tag_name``.
string fixed_value = 3;- Parameters:
value- The fixedValue to set.- Returns:
- This builder for chaining.
-
clearFixedValue
public TagSpecifier.Builder clearFixedValue()
Specifies a fixed tag value for the ``tag_name``.
string fixed_value = 3;- Returns:
- This builder for chaining.
-
setFixedValueBytes
public TagSpecifier.Builder setFixedValueBytes(com.google.protobuf.ByteString value)
Specifies a fixed tag value for the ``tag_name``.
string fixed_value = 3;- Parameters:
value- The bytes for fixedValue to set.- Returns:
- This builder for chaining.
-
setUnknownFields
public final TagSpecifier.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<TagSpecifier.Builder>
-
mergeUnknownFields
public final TagSpecifier.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<TagSpecifier.Builder>
-
-