Add Tags Transform

The Vector add_tags transform accepts and outputs metric events allowing you to add one or more metric tags.

Configuration

vector.toml
[transforms.my_transform_id]
# General
type = "add_tags" # required
inputs = ["my-source-id"] # required
# Tags
tags.static_tag = "my value" # example
tags.env_tag = "${ENV_VAR}" # example
  • tablecommonrequired

    tags

    A table of key/value pairs representing the tags to be added to the metric.

    • stringcommonrequired

      [tag-name]

      The name of the tag to add. Due to the nature of metric tags, the value must be a string.

      • No default
      • View examples

How It Works

Complex Processing

If you encounter limitations with the add_tags transform then we recommend using a runtime transform. These transforms are designed for complex processing and give you the power of full programming runtime.

Environment Variables

Environment variables are supported through all of Vector's configuration. Simply add ${MY_ENV_VAR} in your Vector configuration file and the variable will be replaced before being evaluated.

You can learn more in the Environment Variables section.