Back to Vector

0.26 Upgrade Guide

website/content/en/highlights/2022-11-07-0-26-0-upgrade-guide.md

0.55.03.4 KB
Original Source

Vector's 0.26.0 release includes breaking changes:

  1. Removal of check_fields condition type
  2. Removal of lanes parameter for route transform
  3. Removal of geoip transform

We cover them below to help you upgrade quickly:

Upgrade guide

Breaking changes

Removal of check_fields condition type {#check-fields-removal}

Nearly two years ago, as part of the 0.12.0 release, we had deprecated many transforms and conditions after initially releasing Vector Remap Language. Over time, many of these transforms and conditions were fully removed, but some of them were left as the performance gap between them and their equivalent usage in VRL had significant performance differences.

Since then, many of these performance gaps have been significantly reduced, if not closed entirely. After taking another look at check_fields, it now has less than a 10% performance difference compared to the equivalent VRL, which we feel is close enough to allow us to finally remove support for check_fields.

As we don't always have a full view into what features of Vector are being used, please do not hesitate to let us know if the removal of check_fields, and having to switch over to using VRL, represents a significant performance regression for you.

Removal of lanes parameter for route transform {#lanes-parameter-route-transform-removal}

Similarly to the removal of check_fields, the lanes parameter of the route transform is a holdover from when the transform was originally called swimlanes. It is an alias to the route parameter used to configure the actual routing logic for the transform. We deprecated being able to reference the route transform by its former name of swimlanes in the 0.24.0 release, and removed the ability entirely in 0.25.0.

In following with removing the swimlanes alias, we're now removing the lanes alias as well to finally drop all remaining ties to the original swimlanes name.

A simple change of the field name in your configuration is all that has to change:

yaml
transforms:
  my_route:
    type: route
    lanes: # <-- change this to "route"
      route_a: ..

Removal of geoip transform {#geo-transform-removal}

The geoip transform was deprecated in 0.24.0 and has now been removed. You can get the same functionality through a remap transform with geoip enrichment tables. These can be used with VRL's enrichment table functions to enrich events using a GeoIP database.

For example,

yaml
transforms:
  geoip:
    type: geoip
    inputs:
      - with_ip_info
    database: /etc/vector/GeoLite2-City.mmdb
    source: ip_address
    target: geoip

can be migrated as:

yaml
enrichment_tables:
  geoip_table:
    path: /etc/vector/GeoLite2-City.mmdb
    type: geoip

transforms:
  geoip:
    type: remap
    inputs:
      - with_ip_info
    source: |-
      .geoip = get_enrichment_table_record!("geoip_table",
        {
          "ip": .ip_address
        }
      )

(credit to Jacq for this migration example)