Custom Tag¶
type.tracing.v2.CustomTag¶
[type.tracing.v2.CustomTag proto]
Describes custom tags for the active span.
{
"tag": "...",
"literal": "{...}",
"environment": "{...}",
"request_header": "{...}",
"metadata": "{...}"
}
- tag
(string, REQUIRED) Used to populate the tag name.
- literal
(type.tracing.v2.CustomTag.Literal) A literal custom tag.
Used to specify what kind of custom tag.
Precisely one of literal, environment, request_header, metadata must be set.
- environment
(type.tracing.v2.CustomTag.Environment) An environment custom tag.
Used to specify what kind of custom tag.
Precisely one of literal, environment, request_header, metadata must be set.
- request_header
(type.tracing.v2.CustomTag.Header) A request header custom tag.
Used to specify what kind of custom tag.
Precisely one of literal, environment, request_header, metadata must be set.
- metadata
(type.tracing.v2.CustomTag.Metadata) A custom tag to obtain tag value from the metadata.
Used to specify what kind of custom tag.
Precisely one of literal, environment, request_header, metadata must be set.
type.tracing.v2.CustomTag.Literal¶
[type.tracing.v2.CustomTag.Literal proto]
Literal type custom tag with static value for the tag value.
{
"value": "..."
}
- value
(string, REQUIRED) Static literal value to populate the tag value.
type.tracing.v2.CustomTag.Environment¶
[type.tracing.v2.CustomTag.Environment proto]
Environment type custom tag with environment name and default value.
{
"name": "...",
"default_value": "..."
}
- name
(string, REQUIRED) Environment variable name to obtain the value to populate the tag value.
- default_value
(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.
type.tracing.v2.CustomTag.Header¶
[type.tracing.v2.CustomTag.Header proto]
Header type custom tag with header name and default value.
{
"name": "...",
"default_value": "..."
}
- name
(string, REQUIRED) Header name to obtain the value to populate the tag value.
- default_value
(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.
type.tracing.v2.CustomTag.Metadata¶
[type.tracing.v2.CustomTag.Metadata proto]
Metadata type custom tag using MetadataKey to retrieve the protobuf value from Metadata, and populate the tag value with the canonical JSON representation of it.
{
"kind": "{...}",
"metadata_key": "{...}",
"default_value": "..."
}
- kind
(type.metadata.v2.MetadataKind) Specify what kind of metadata to obtain tag value from.
- metadata_key
(type.metadata.v2.MetadataKey) Metadata key to define the path to retrieve the tag value.
- default_value
(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.