Project: Gloo (Orchestration & Management / API Gateway)
File: custom_tag.proto.sk.md

title: "custom_tag.proto" weight: 5 <!-- Code generated by solo-kit. DO NOT EDIT. --> Describes custom tags for the active span. [#next-free-field: 6] ```yaml "tag": string "literal": .solo.io.envoy.type.tracing.v3.CustomTag.Literal "environment": .solo.io.envoy.type.tracing.v3.CustomTag.Environment "requestHeader": .solo.io.envoy.type.tracing.v3.CustomTag.Header "metadata": .solo.io.envoy.type.tracing.v3.CustomTag.Metadata ``` | Field | Type | Description | | -- | - | -- | | `tag` | `string` | Used to populate the tag name. | | `literal` | | A literal custom tag. Only one of `literal`, `environment`, `requestHeader`, or `metadata` can be set. | | `environment` | | An environment custom tag. Only one of `environment`, `literal`, `requestHeader`, or `metadata` can be set. | | `requestHeader` | | A request header custom tag. Only one of `requestHeader`, `literal`, `environment`, or `metadata` can be set. | | `metadata` | | A custom tag to obtain tag value from the metadata. Only one of `metadata`, `literal`, `environment`, or `requestHeader` can be set. | Literal type custom tag with static value for the tag value. ```yaml "value": string ``` | Field | Type | Description | | -- | - | -- | | `value` | `string` | Static literal value to populate the tag value. | Environment type custom tag with environment name and default value. ```yaml "name": string "defaultValue": string ``` | Field | Type | Description | | -- | - | -- | | `name` | `string` | Environment variable name to obtain the value to populate the tag value. | | `defaultValue` | `string` | When the environment variable is not found, the tag value will be populated with this default value if specified, otherwise no tag will be populated. | Header type custom tag with header name and default value. ```yaml "name": string "defaultValue": string ``` | Field | Type | Description | | -- | - | -- | | `name` | `string` | Header name to obtain the value to populate the tag value. | | `defaultValue` | `string` | When the header does not exist, the tag value will be populated with this default value if specified, otherwise no tag will be populated. | Metadata type custom tag using :ref:`MetadataKey <envoyapimsg_type.metadata.v3.MetadataKey>` to retrieve the protobuf value from :ref:`Metadata <envoyapimsg_config.core.v3.Metadata>`, and populate the tag value with `the canonical JSON <https://developers.google.com/protocol-buffers/docs/proto3#json>`_ representation of it. ```yaml "kind": .solo.io.envoy.type.metadata.v3.MetadataKind "metadataKey": .solo.io.envoy.type.metadata.v3.MetadataKey "defaultValue": string ``` | Field | Type | Description | | -- | - | -- | | `kind` | | Specify what kind of metadata to obtain tag value from. | | `metadataKey` | | Metadata key to define the path to retrieve the tag value. | | `defaultValue` | `string` | When no valid metadata is found, the tag value would be populated with this default value if specified, otherwise no tag would be populated. | <!-- Start of HubSpot Embed Code --> <script type="text/javascript" id="hs-script-loader" async defer src="//js.hs-scripts.com/5130874.js"></script> <!-- End of HubSpot Embed Code -->