record_accessor
plugin helper provides unified access to the event record. It uses jsonpath
like syntax for the target field. With this helper, you can easily access/delete a nested field in the plugin.$.
is the starting parameter. Chain fields with dots .
.$.event.level
for record["event"]["level"]
$.key1[0].key2
for record["key1"][0]["key2"]
$[
starting parameter. Chain fields with []
..
, whitespace, etc.$['dot.key'][0]['space key']
for record["dot.key"][0]["space key"]
$.
or $[
starting value, e.g. key log
, it is the same as record["log"]
. So, using record_accessor
does not break the existing plugin behavior.record_accessor_create(param)
param
is a String
.call
/delete
/set
method with the record object.set
method is supported since v1.10.3record_accessor