Skip to content

Latest commit

 

History

History
33 lines (28 loc) · 903 Bytes

2020-03-04-encoding-only-fields-except-fields.md

File metadata and controls

33 lines (28 loc) · 903 Bytes
date title description authors pr_numbers release hide_on_release_notes badges
2020-07-13
New Encoding Options
Vector now lets you whitelist, blacklist, and format fields when events are encoded
binarylogic
1915
0.9.0
false
type domains
enhancement
sinks

Vector has deprecated the root-level encoding option in favor of new encoding.* sub-options:

  • encoding.only_fields - Encode only the fields listed.
  • encoding.except_fields - Encode all fields except the ones listed.
  • encoding.codec - The codec to use (ex: json).
  • encoding.timestamp_format - Customize how timestamps are serialized.

Upgrade Guide

Upgrading is easy:

 [sinks.my-sink]
   type = "..."
-  encoding = "json"
+  encoding.codec = "json"
+  encoding.except_fields = ["_meta"] # optional
+  encoding.timestamp_format = "rfc3339" # optional