YAML event record type object

An event record type object is the type of an event record.

An event record type describes parts (specific context and payload fields) of what a CTF consumer needs to decode its instances (event records). The other parts (header and common context) are described by the data stream type which contains the event record type.

Event record type objects are only found under the event-record-types property of a data stream type object.

barectf generates one tracing function per event record type.

Properties

All the properties are optional.

Name Type Description Default

log-level

Positive integer or string

Numeric log level of this event record type’s instances.

If this property’s value is a string, it’s the name of an existing log level alias.

No log level

specific-context-field-type

Structure field type object or string

Specific context field type of this event record type.

If this property’s value is a string, it must be the name of an existing field type alias.

For each member NAME of this property, the tracing function which barectf generates for this event record type has an additional parameter named sc_NAME.

Member names must be valid TSDL identifiers.

No specific context field type

payload-field-type

Structure field type object or string

Payload field type of this event record type.

If this property’s value is a string, it must be the name of an existing field type alias.

For each member NAME of this property, the tracing function which barectf generates for this event record type has an additional parameter named p_NAME.

Member names must be valid TSDL identifiers.

No payload field type

$include

Sequence of strings.

No inclusions

Examples

Example 1. Basic event record type object.
payload-field-type:
  class: structure
  members:
    - msg: string
Example 2. Event record type object with a log level.
log-level: 12
payload-field-type:
  class: structure
  members:
    - msg: string
Example 3. Event record type object with a log level (using a log level alias).
log-level: CRITICAL
payload-field-type:
  class: structure
  members:
    - msg: string
Example 4. Event record type object with a specific context field type.
specific-context-field-type:
  class: structure
  members:
    - count:
        field-type:
          class: signed-integer
          size: 32
payload-field-type:
  class: structure
  members:
    - msg: string
Example 5. Event record type object with inclusions.
payload-field-type:
  class: structure
  members:
    - msg: string
    - ip_addr:
        field-type:
          class: static-array
          length: 4
          element-field-type: uint8
$include: [net-ctx.yaml]