public static final class Stats.TagSpecifier extends com.google.protobuf.GeneratedMessageV3 implements Stats.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.v2.TagSpecifier| Modifier and Type | Class and Description |
|---|---|
static class |
Stats.TagSpecifier.Builder
Designates a tag name and value pair.
|
static class |
Stats.TagSpecifier.TagValueCase |
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| Modifier and Type | Field and Description |
|---|---|
static int |
FIXED_VALUE_FIELD_NUMBER |
static int |
REGEX_FIELD_NUMBER |
static int |
TAG_NAME_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
static Stats.TagSpecifier |
getDefaultInstance() |
Stats.TagSpecifier |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
String |
getFixedValue()
Specifies a fixed tag value for the ``tag_name``.
|
com.google.protobuf.ByteString |
getFixedValueBytes()
Specifies a fixed tag value for the ``tag_name``.
|
com.google.protobuf.Parser<Stats.TagSpecifier> |
getParserForType() |
String |
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 |
getRegexBytes()
Designates a tag to strip from the tag extracted name and provide as a named
tag value for all statistics.
|
int |
getSerializedSize() |
String |
getTagName()
Attaches an identifier to the tag values to identify the tag being in the
sink.
|
com.google.protobuf.ByteString |
getTagNameBytes()
Attaches an identifier to the tag values to identify the tag being in the
sink.
|
Stats.TagSpecifier.TagValueCase |
getTagValueCase() |
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
int |
hashCode() |
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static Stats.TagSpecifier.Builder |
newBuilder() |
static Stats.TagSpecifier.Builder |
newBuilder(Stats.TagSpecifier prototype) |
Stats.TagSpecifier.Builder |
newBuilderForType() |
protected Stats.TagSpecifier.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
static Stats.TagSpecifier |
parseDelimitedFrom(InputStream input) |
static Stats.TagSpecifier |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Stats.TagSpecifier |
parseFrom(byte[] data) |
static Stats.TagSpecifier |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Stats.TagSpecifier |
parseFrom(ByteBuffer data) |
static Stats.TagSpecifier |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Stats.TagSpecifier |
parseFrom(com.google.protobuf.ByteString data) |
static Stats.TagSpecifier |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Stats.TagSpecifier |
parseFrom(com.google.protobuf.CodedInputStream input) |
static Stats.TagSpecifier |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Stats.TagSpecifier |
parseFrom(InputStream input) |
static Stats.TagSpecifier |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<Stats.TagSpecifier> |
parser() |
Stats.TagSpecifier.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, newBuilderForType, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int TAG_NAME_FIELD_NUMBER
public static final int REGEX_FIELD_NUMBER
public static final int FIXED_VALUE_FIELD_NUMBER
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields in interface com.google.protobuf.MessageOrBuildergetUnknownFields in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public Stats.TagSpecifier.TagValueCase getTagValueCase()
getTagValueCase in interface Stats.TagSpecifierOrBuilderpublic 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 `well_known_names.h <https://github.com/envoyproxy/envoy/blob/master/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;getTagName in interface Stats.TagSpecifierOrBuilderpublic 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 `well_known_names.h <https://github.com/envoyproxy/envoy/blob/master/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;getTagNameBytes in interface Stats.TagSpecifierOrBuilderpublic 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;getRegex in interface Stats.TagSpecifierOrBuilderpublic 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;getRegexBytes in interface Stats.TagSpecifierOrBuilderpublic String getFixedValue()
Specifies a fixed tag value for the ``tag_name``.
string fixed_value = 3;getFixedValue in interface Stats.TagSpecifierOrBuilderpublic com.google.protobuf.ByteString getFixedValueBytes()
Specifies a fixed tag value for the ``tag_name``.
string fixed_value = 3;getFixedValueBytes in interface Stats.TagSpecifierOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static Stats.TagSpecifier parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Stats.TagSpecifier parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Stats.TagSpecifier parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Stats.TagSpecifier parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Stats.TagSpecifier parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Stats.TagSpecifier parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Stats.TagSpecifier parseFrom(InputStream input) throws IOException
IOExceptionpublic static Stats.TagSpecifier parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Stats.TagSpecifier parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static Stats.TagSpecifier parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Stats.TagSpecifier parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static Stats.TagSpecifier parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic Stats.TagSpecifier.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static Stats.TagSpecifier.Builder newBuilder()
public static Stats.TagSpecifier.Builder newBuilder(Stats.TagSpecifier prototype)
public Stats.TagSpecifier.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected Stats.TagSpecifier.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static Stats.TagSpecifier getDefaultInstance()
public static com.google.protobuf.Parser<Stats.TagSpecifier> parser()
public com.google.protobuf.Parser<Stats.TagSpecifier> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public Stats.TagSpecifier getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2018 The Envoy Project. All rights reserved.