Class TagSpecifier
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- io.envoyproxy.envoy.config.metrics.v3.TagSpecifier
-
- All Implemented Interfaces:
com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,TagSpecifierOrBuilder,Serializable
public final class TagSpecifier extends com.google.protobuf.GeneratedMessageV3 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.v3.TagSpecifier- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTagSpecifier.BuilderDesignates a tag name and value pair.static classTagSpecifier.TagValueCase-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static intFIXED_VALUE_FIELD_NUMBERstatic intREGEX_FIELD_NUMBERstatic intTAG_NAME_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)static TagSpecifiergetDefaultInstance()TagSpecifiergetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()StringgetFixedValue()Specifies a fixed tag value for the ``tag_name``.com.google.protobuf.ByteStringgetFixedValueBytes()Specifies a fixed tag value for the ``tag_name``.com.google.protobuf.Parser<TagSpecifier>getParserForType()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.intgetSerializedSize()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()com.google.protobuf.UnknownFieldSetgetUnknownFields()booleanhasFixedValue()Specifies a fixed tag value for the ``tag_name``.inthashCode()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()static TagSpecifier.BuildernewBuilder()static TagSpecifier.BuildernewBuilder(TagSpecifier prototype)TagSpecifier.BuildernewBuilderForType()protected TagSpecifier.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)static TagSpecifierparseDelimitedFrom(InputStream input)static TagSpecifierparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static TagSpecifierparseFrom(byte[] data)static TagSpecifierparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static TagSpecifierparseFrom(com.google.protobuf.ByteString data)static TagSpecifierparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static TagSpecifierparseFrom(com.google.protobuf.CodedInputStream input)static TagSpecifierparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static TagSpecifierparseFrom(InputStream input)static TagSpecifierparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static TagSpecifierparseFrom(ByteBuffer data)static TagSpecifierparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<TagSpecifier>parser()TagSpecifier.BuildertoBuilder()voidwriteTo(com.google.protobuf.CodedOutputStream output)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
TAG_NAME_FIELD_NUMBER
public static final int TAG_NAME_FIELD_NUMBER
- See Also:
- Constant Field Values
-
REGEX_FIELD_NUMBER
public static final int REGEX_FIELD_NUMBER
- See Also:
- Constant Field Values
-
FIXED_VALUE_FIELD_NUMBER
public static final int FIXED_VALUE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getUnknownFields
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
- Specified by:
getUnknownFieldsin interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3
-
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
-
getTagValueCase
public TagSpecifier.TagValueCase getTagValueCase()
- Specified by:
getTagValueCasein interfaceTagSpecifierOrBuilder
-
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_v3_api_field_config.metrics.v3.TagSpecifier.tag_name>` is provided in the config and neither :ref:`regex <envoy_v3_api_field_config.metrics.v3.TagSpecifier.regex>` or :ref:`fixed_value <envoy_v3_api_field_config.metrics.v3.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_v3_api_field_config.metrics.v3.TagSpecifier.tag_name>` is provided in the config and neither :ref:`regex <envoy_v3_api_field_config.metrics.v3.TagSpecifier.regex>` or :ref:`fixed_value <envoy_v3_api_field_config.metrics.v3.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.
-
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.
-
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.
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static TagSpecifier parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TagSpecifier parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TagSpecifier parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TagSpecifier parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TagSpecifier parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TagSpecifier parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TagSpecifier parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static TagSpecifier parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static TagSpecifier parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static TagSpecifier parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static TagSpecifier parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static TagSpecifier parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
newBuilderForType
public TagSpecifier.Builder newBuilderForType()
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
public static TagSpecifier.Builder newBuilder()
-
newBuilder
public static TagSpecifier.Builder newBuilder(TagSpecifier prototype)
-
toBuilder
public TagSpecifier.Builder toBuilder()
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected TagSpecifier.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static TagSpecifier getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<TagSpecifier> parser()
-
getParserForType
public com.google.protobuf.Parser<TagSpecifier> getParserForType()
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public TagSpecifier getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-