Interface TagSpecifierOrBuilder

All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder
All Known Implementing Classes:
TagSpecifier, TagSpecifier.Builder

public interface TagSpecifierOrBuilder extends com.google.protobuf.MessageOrBuilder
  • Method Summary

    Modifier and Type
    Method
    Description
    Specifies a fixed tag value for the ``tag_name``.
    com.google.protobuf.ByteString
    Specifies a fixed tag value for the ``tag_name``.
    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.
    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``.
    boolean
    Designates a tag to strip from the tag extracted name and provide as a named tag value for all statistics.

    Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder

    isInitialized

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Method Details

    • getTagName

      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::
      
       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;
      Returns:
      The tagName.
    • getTagNameBytes

      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;
      Returns:
      The bytes for tagName.
    • hasRegex

      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) = { ... }
      Returns:
      Whether the regex field is set.
    • getRegex

      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 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) = { ... }
      Returns:
      The regex.
    • getRegexBytes

      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) = { ... }
      Returns:
      The bytes for regex.
    • hasFixedValue

      boolean hasFixedValue()
       Specifies a fixed tag value for the ``tag_name``.
       
      string fixed_value = 3;
      Returns:
      Whether the fixedValue field is set.
    • getFixedValue

      String getFixedValue()
       Specifies a fixed tag value for the ``tag_name``.
       
      string fixed_value = 3;
      Returns:
      The fixedValue.
    • getFixedValueBytes

      com.google.protobuf.ByteString getFixedValueBytes()
       Specifies a fixed tag value for the ``tag_name``.
       
      string fixed_value = 3;
      Returns:
      The bytes for fixedValue.
    • getTagValueCase

      TagSpecifier.TagValueCase getTagValueCase()