0.40 Upgrade Guide

An upgrade guide that addresses breaking changes in 0.40.0

Vector’s 0.40.0 release includes three breaking changes:

  1. GELF codec defaults to null-delimited messages for stream-based sources
  2. Reduce transforms now properly aggregate nested fields
  3. Vector no longer supports CentOS 7

We cover them below to help you upgrade quickly:

Upgrade guide

Breaking Change

GELF codec defaults to null-delimited messages for stream-based sources

The GELF codec with stream-based sources now uses null byte (\\0) by default as messages delimiter instead of newline (\\n) character. This better matches GELF server behavior.

Configuration changes

In order to maintain the previous behavior, you must set the framing.method option to the character_delimited method and the framing.character_delimited.delimiter option to \\n when using GELF codec with stream-based sources.

Example configuration change for socket source
Previous
sources:
  my_source_id:
    type: "socket"
    address: "0.0.0.0:9000"
    mode: "tcp"
    decoding:
      codec: "gelf"
Current
sources:
  my_source_id:
    type: "socket"
    address: "0.0.0.0:9000"
    mode: "tcp"
    decoding:
      codec: "gelf"
    framing:
      method: "character_delimited"
    character_delimited:
      delimiter: "\n"

Reduce transforms now properly aggregate nested fields

Reduce transforms can now properly aggregate nested fields.

This is a breaking change because previously, merging object elements used the “discard” strategy. The new behavior is to use the default strategy based on the element type.

Example
Config
group_by = [ "id" ]
merge_strategies.id = "discard"
merge_strategies."a.b[0]" = "array"
Event 1
{
  "id": 777,
  "an_array": [
    {
      "inner": 1
    }
  ],
  "message": {
    "a": {
      "b": [1, 2],
      "num": 1
    }
  }
}
Event 2
{
  "id": 777,
  "an_array": [
    {
      "inner": 2
    }
  ],
  "message": {
    "a": {
      "b": [3, 4],
      "num": 2
    }
  }
}
Reduced Event

Old behavior:

{
  "id": 777,
  "an_array": [
    {
      "inner": 2
    }
  ],
  "message": {
    "a": {
      "b": [1, 2],
      "num": 1
    }
  }
}

New behavior:

{
  "id": 777,
  "an_array": [
    {
      "inner": 1
    }
  ],
  "message": {
    "a": {
      "b": [
        [1, 2],
        [3,4]
      ],
      "num": 3
    }
  }
}

Vector no longer supports CentOS 7

With this release, Vector has dropped support for CentOS 7 because CentOS 7 became EOL on June 30th, 2024.