Set Metadata

  • v3 API reference

  • This filter should be configured with the name envoy.filters.http.set_metadata.

This filters adds or updates dynamic metadata with static data.

Dynamic metadata values are updated with the following scheme. If a key does not exists, it’s just copied into the current metadata. If the key exists but has a different type, it is replaced by the new value. Otherwise:

  • for scalar values (null, string, number, boolean) are replaced with the new value

  • for lists: new values are added to the current list

  • for structures: recursively apply this scheme

For instance, if the namespace already contains this structure:

  1. myint: 1
  2. mylist: ["a"]
  3. mykey: ["val"]
  4. mytags:
  5. tag0: 1

and the value to set is:

  1. myint: 2
  2. mylist: ["b","c"]
  3. mykey: 1
  4. mytags:
  5. tag1: 1

After applying this filter, the namespace will contain:

  1. myint: 2
  2. mylist: ["a","b","c"]
  3. mykey: 1
  4. mytags:
  5. tag0: 1
  6. tag1: 1

Statistics

Currently, this filter generates no statistics.