CLI: add-trigger: add --capture option to `on-event` condition
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 18 Mar 2020 16:11:18 +0000 (12:11 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 9 Mar 2021 03:55:55 +0000 (22:55 -0500)
commit20a01d1592c8e83d2dfe51cbd192857537ae7d4e
treef211c381bca1a676cf16246fc5dd967795131dfd
parent8b5240601e4ddf6127e4291b7194dd5179cb35b5
CLI: add-trigger: add --capture option to `on-event` condition

This patch adds a `--capture` option to the `on-event` condition, to
allow specifying the values of payload or context fields to capture.

The filter parser is re-used, as the syntax of the capture expression is
a subset of the filter expression syntax.  Allowed forms are:

  - payload field name: foo
  - context field name: $ctx.foo
  - app-specific field name: $app.foo:bar

After any of these, array indexing can be used.  For example,
`$ctx.foo[2]`.

Change-Id: I6246148634053b32294956d1f7a03f2798fd1d71
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Depends-on: lttng-ust: I5a800fc92e588c2a6a0e26282b0ad5f31c044479
src/bin/lttng/commands/add_trigger.c
src/common/filter/filter-ir.h
tests/regression/tools/trigger/test_add_trigger_cli
This page took 0.024907 seconds and 4 git commands to generate.