0.25 Upgrade Guide
An upgrade guide that addresses breaking changes in 0.25.0
Vector’s 0.25.0 release includes breaking changes:
- Removal of VRL’s modulo operator
- Removal of the
internal_metricsdefaults to setting
- Removal of the
vectorsource and sink v1 protocol
- Removal of
- Change in the
lokisink’s request encoding
- Deprecation of VRL metadata functions
- Deprecation of
endpointoption in Elasticsearch sink
- Deprecation of the Lua version 1 API
We cover them below to help you upgrade quickly:
Removal of VRL’s modulo operator
VRL’s modulo operator (
%) was deprecated in
0.24.0 and has now been removed. The
can be used instead.
5 % 2 == 1
mod(5, 2) == 1
Removal of the
In 0.24.0, we announced that the
new_relic_logs sink had been deprecated,
and that users should prefer to use the
new_relic sink instead, which has support not only for
logs, but also metrics and traces. Switching from
new_relic is not as simple
as just changing the sink type field, but it only involves a few small changes which we’ll cover
First, you’ll have to change the
new_relic. As well, you’ll have
to set a field,
api, to specify that you’re sending logs. The value of this field should
Lastly, you’ll need to tweak the credentials used to specify your New Relic account credentials.
new_relic_logs sink, you had the option to specify either your Insights insert
insert_key) or your License key (
license_key). With the
new_relic sink, you can no longer use an Insights insert key, and must use a license key.
Additionally, the account ID must also now be specified.
All put together, here’s an example of converting from a
new_relic_logs sink configuration over to
new_relic sink configuration:
[sinks.new_relic_logs] type = "new_relic_logs" license_key = "xxxx" [sinks.new_relic] type = "new_relic" license_key = "xxxx" account_id = "yyyy" api = "logs"
internal_metrics defaults to setting
internal_metrics source now defaults to setting the host tag on emitted metrics. This behavior
avoids issues when deploying multiple Vector instances publishing their metrics to the same sink
without opting into this tag via
tags.host_key. The default key for this is the configured
log_schema.host_key (which defaults to
This behavior can be opted out of by setting
tags.host_key = "" on the
Removal of the
vector source and sink v1 protocol
The original v1 protocol of the
vector source and sink was marked as deprecated in version
0.20.0. This version removes support for the deprecated protocol and its
version field is still accepted in configurations, but only version numbered
2 is accepted.
shutdown_timeout_secs config for the
vector v2 source didn’t actually do anything, so
it was removed.
Change in the
loki sink’s request encoding
Vector now defaults to sending requests to Loki as snappy-compressed protobuf, rather than JSON.
The old behavior can be kept by setting the
compression option to either
none being the previous default.
Deprecation of VRL metadata functions
0.25.0 has introduced a new metadata path syntax available in VRL which points
directly to event metadata. This means the metadata functions are no longer necessary and
will be removed in the future.
|set||set_metadata_field(.foo.bar, “value”)||%foo.bar = “value”|
endpoint option in Elasticsearch sink
0.25.0 has introduced distribution of events to multiple endpoints for Elasticsearch sink.
In order to enable this distribution, a new
endpoints setting has been introduced which configures one or more destinations to which to distribute the events.
endpoint setting is now deprecated and will be removed in a future version.
Deprecation of the Lua version 1 API
0.9.0 introduced the version 2 API for the
This API has long been considered fully mature, obviating the need to maintain the older API.
Additionally, the older API has no support for data types other than logs.
The older version 1 API is now deprecated and will be removed in a future version.
For example, the following partial configuration:
[transform.example] type = "lua" version = 1 source = """ event["a"] = "some value" event["b"] = nil """
would need to be converted to the following:
[transform.example] type = "lua" version = 2 hooks.process = """ function (event, emit) event.log.a = "some value" event.log.b = nil emit(event) end """