0.38 Upgrade Guide

An upgrade guide that addresses breaking changes in 0.38.0

Vector’s 0.38.0 release includes a breaking change:

  1. Vector now requires mandatory environment variables

and deprecations:

  1. Deprecation of the path coalescing operator
  2. Deprecation of enterprise configuration

We cover them below to help you upgrade quickly:

Upgrade guide

Breaking Change

Vector now requires mandatory environment variables

Vector has the ability to interpolate environment variables into its configuration as a means of templating configuration. Now, if an environment variable is undefined, and no default is set, Vector will output an error and stop. To set a default, use the - interpolation syntax.

If you want to have Vector start-up even if an environment variable is undefined you can provide a default like ${FOO-bar} to default FOO to bar if it is unset.

The reason for this change is that users often miss the undefined variable warning and are confused by Vector not behaving as the expected. Certain characters need to be escaped in regex capture groups to avoid interpolation. For example, instead of using $1, you need to add an escape as $$1.

Deprecations

Path coalescing is deprecated

Coalescing of field lookup paths (e.g. .(field1|field2)) are deprecated and will be removed in a future version. This feature did not seem to be used much and significantly complicates parts of the codebase.

If you were using this feature, you can accomplish the same through conditionals in VRL like:

field = if exists(.field1) {
  .field1
} else if exists(.field2) {
  .field2
}

Deprecation of enterprise configuration

The enterprise global configuration option that was used to integrate Vector with the Datadog Observability Pipelines product has been deprecated and will be removed in a future Vector version. Please reach out to Datadog support if you are impacted by this.