[lttng-dev] [barectf] Support for empty payload ?

Jean-François Monestier jean-francois.monestier at st.com
Fri Mar 25 14:57:54 UTC 2016


Le 3/25/2016 3:34 PM, Simon Marchi a écrit :
> On 2016-03-25 10:14, Jean-François Monestier wrote:
>> Hello Tracers,
>>
>> Does anyone know whether barectf supports some sort of empty payloads
>> for events specified in the .yaml configuration file ?
>>
>> Something such as the well-known lttng_ust_statedump:start event :
>>
>> event {
>>          name = "lttng_ust_statedump:start";
>>          id = 0;
>>          stream_id = 0;
>>          loglevel = 13;
>>          fields := struct {
>>          };
>> };
>>
>> I can't figure out the yaml syntax for such an event, your help would
>> be welcome.
>>
>> I must confess I'm still stuck to barectf v2.0.2
>>
>>
>> Thanks in advance,
>
> Hi Jean-François,
>
> I don't believe barectf allows specifying empty payloads as of now.
> Trying to specify an empty fields dict, such as:
>
> simple_uint32:
>     log-level: CRIT
>     payload-type:
>       class: struct
>       fields: {}
>
> yields:
>
> Error:
>     cannot create configuration from YAML file "config.yaml":
>     metadata error:
>     invalid event in stream "default":
>     event payload type must have at least one field for event
> "simple_uint32"
>
> See:
> https://github.com/efficios/barectf/blob/master/barectf/config.py#L1119
>
> The maintainers will be able to confirm/infirm, and say whether it's in
> the plans to add support for that.
>
> Simon
>

Thank you, Simon, for your prompt response.

I should have mentionned it, but my numerous, 'creative' attempts popped 
up a few error messages, such as

Error:
   cannot create configuration from YAML file:
   cannot create stream "default":
   cannot create event "start":
   missing "payload-type" property in event object

Error:
   cannot create configuration from YAML file:
   cannot create stream "default":
   cannot create event "start":
   cannot create event's payload type object:
   type objects must be associative arrays

Error:
   cannot create configuration from YAML file:
   metadata error:
   invalid event in stream "default":
   event payload type must have at least one field for event "start"

Error:
   cannot create configuration from YAML file:
   cannot create stream "default":
   cannot create event "start":
   cannot create event's payload type object:
   "fields" property of structure type object must be an associative array


Bye for now,
-- 
Jean-Francois Monestier
041-6766


More information about the lttng-dev mailing list