Class TagSpecifier
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
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.GeneratedMessage
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 type
envoy.config.metrics.v3.TagSpecifier
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Designates a tag name and value pair.static enum
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,
BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message, T>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage
com.google.protobuf.AbstractMessage.BuilderParent
Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final TagSpecifier
static final int
private byte
private static final com.google.protobuf.Parser
<TagSpecifier> static final int
private static final long
static final int
private Object
private Object
private int
Fields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, unknownFields
Fields inherited from class com.google.protobuf.AbstractMessage
memoizedSize
Fields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
private
TagSpecifier
(com.google.protobuf.GeneratedMessage.Builder<?> builder) -
Method Summary
Modifier and TypeMethodDescriptionboolean
static TagSpecifier
static final com.google.protobuf.Descriptors.Descriptor
Specifies a fixed tag value for the ``tag_name``.com.google.protobuf.ByteString
Specifies a fixed tag value for the ``tag_name``.com.google.protobuf.Parser
<TagSpecifier> getRegex()
Designates a tag to strip from the tag extracted name and provide as a named tag value for all statistics.com.google.protobuf.ByteString
Designates a tag to strip from the tag extracted name and provide as a named tag value for all statistics.int
Attaches an identifier to the tag values to identify the tag being in the sink.com.google.protobuf.ByteString
Attaches an identifier to the tag values to identify the tag being in the sink.boolean
Specifies a fixed tag value for the ``tag_name``.int
hashCode()
boolean
hasRegex()
Designates a tag to strip from the tag extracted name and provide as a named tag value for all statistics.protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
final boolean
static TagSpecifier.Builder
static TagSpecifier.Builder
newBuilder
(TagSpecifier prototype) protected TagSpecifier.Builder
newBuilderForType
(com.google.protobuf.AbstractMessage.BuilderParent parent) static TagSpecifier
parseDelimitedFrom
(InputStream input) static TagSpecifier
parseDelimitedFrom
(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TagSpecifier
parseFrom
(byte[] data) static TagSpecifier
parseFrom
(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TagSpecifier
parseFrom
(com.google.protobuf.ByteString data) static TagSpecifier
parseFrom
(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TagSpecifier
parseFrom
(com.google.protobuf.CodedInputStream input) static TagSpecifier
parseFrom
(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TagSpecifier
parseFrom
(InputStream input) static TagSpecifier
parseFrom
(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TagSpecifier
parseFrom
(ByteBuffer data) static TagSpecifier
parseFrom
(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser
<TagSpecifier> parser()
void
writeTo
(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessage
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, 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, hashFields, toString
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeTo
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
tagValueCase_
private int tagValueCase_ -
tagValue_
-
TAG_NAME_FIELD_NUMBER
public static final int TAG_NAME_FIELD_NUMBER- See Also:
-
tagName_
-
REGEX_FIELD_NUMBER
public static final int REGEX_FIELD_NUMBER- See Also:
-
FIXED_VALUE_FIELD_NUMBER
public static final int FIXED_VALUE_FIELD_NUMBER- See Also:
-
memoizedIsInitialized
private byte memoizedIsInitialized -
DEFAULT_INSTANCE
-
PARSER
-
-
Constructor Details
-
TagSpecifier
private TagSpecifier(com.google.protobuf.GeneratedMessage.Builder<?> builder) -
TagSpecifier
private TagSpecifier()
-
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessage
-
getTagValueCase
- Specified by:
getTagValueCase
in interfaceTagSpecifierOrBuilder
-
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:: A stat name may be spelled in such a way that it matches two different tag extractors for the same tag name. In that case, all but one of the tag values will be dropped. It is not specified which tag value will be retained. The extraction will only occur for one of the extractors, and only the matched extraction will be removed from the tag name.
string tag_name = 1;
- Specified by:
getTagName
in 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:: A stat name may be spelled in such a way that it matches two different tag extractors for the same tag name. In that case, all but one of the tag values will be dropped. It is not specified which tag value will be retained. The extraction will only occur for one of the extractors, and only the matched extraction will be removed from the tag name.
string tag_name = 1;
- Specified by:
getTagNameBytes
in 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 from the elaborated stat name. The first regex will save ``ios.`` as the tag value for ``envoy.http_user_agent``. It will leave it in the name for potential matching with additional tag specifiers. After all tag specifiers are processed the tags will be removed from the name. The second regex will populate tag ``envoy.http_conn_manager_prefix`` with value ``connection_manager_1.``, based on the original stat name. As a final step, the matched tags are removed, leaving ``http.user_agent.downstream_cx_total`` as the tag extracted name.
string regex = 2 [(.validate.rules) = { ... }
- Specified by:
hasRegex
in interfaceTagSpecifierOrBuilder
- Returns:
- Whether the regex field is set.
-
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 from the elaborated stat name. The first regex will save ``ios.`` as the tag value for ``envoy.http_user_agent``. It will leave it in the name for potential matching with additional tag specifiers. After all tag specifiers are processed the tags will be removed from the name. The second regex will populate tag ``envoy.http_conn_manager_prefix`` with value ``connection_manager_1.``, based on the original stat name. As a final step, the matched tags are removed, leaving ``http.user_agent.downstream_cx_total`` as the tag extracted name.
string regex = 2 [(.validate.rules) = { ... }
- Specified by:
getRegex
in 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 from the elaborated stat name. The first regex will save ``ios.`` as the tag value for ``envoy.http_user_agent``. It will leave it in the name for potential matching with additional tag specifiers. After all tag specifiers are processed the tags will be removed from the name. The second regex will populate tag ``envoy.http_conn_manager_prefix`` with value ``connection_manager_1.``, based on the original stat name. As a final step, the matched tags are removed, leaving ``http.user_agent.downstream_cx_total`` as the tag extracted name.
string regex = 2 [(.validate.rules) = { ... }
- Specified by:
getRegexBytes
in 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:
hasFixedValue
in interfaceTagSpecifierOrBuilder
- Returns:
- Whether the fixedValue field is set.
-
getFixedValue
Specifies a fixed tag value for the ``tag_name``.
string fixed_value = 3;
- Specified by:
getFixedValue
in 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:
getFixedValueBytes
in interfaceTagSpecifierOrBuilder
- Returns:
- The bytes for fixedValue.
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeTo
in interfacecom.google.protobuf.MessageLite
- Overrides:
writeTo
in classcom.google.protobuf.GeneratedMessage
- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSize
in interfacecom.google.protobuf.MessageLite
- Overrides:
getSerializedSize
in classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equals
in interfacecom.google.protobuf.Message
- Overrides:
equals
in classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfacecom.google.protobuf.Message
- Overrides:
hashCode
in 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
- Throws:
IOException
-
parseFrom
public static TagSpecifier parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static TagSpecifier parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static TagSpecifier parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilder
in interfacecom.google.protobuf.Message
- Specified by:
toBuilder
in interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected TagSpecifier.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
newBuilderForType
in classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForType
in interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-