1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
|
= YAML event record type object
An _**event record type object**_ is the type of an
xref:how-barectf-works:ctf-primer.adoc#er[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 xref:dst-obj.adoc[data stream type] which contains the event record
type.
Event record type objects are only found under the
xref:dst-obj.adoc#erts-prop[`event-record-types` property] of a data
stream type object.
barectf generates one xref:tracing-funcs:index.adoc[tracing function]
per event record type.
[[props]]
== Properties
All the properties are optional.
[%autowidth.stretch, cols="d,d,a,d", role="can-break"]
|===
|Name |Type |Description |Default
|[[ll-prop]]`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
xref:trace-type-obj.adoc#ll-aliases-prop[log level alias].
|No log level
|[[spec-ctx-ft-prop]]`specific-context-field-type`
|xref:struct-ft-obj.adoc[Structure field type object] or string
|
xref:how-barectf-works:ctf-primer.adoc#er[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
xref:trace-type-obj.adoc#ft-aliases-prop[field type alias].
For each member `__NAME__` of this property, the
xref:tracing-funcs:index.adoc[tracing function] which barectf generates
for this event record type has an additional parameter named
`sc___NAME__`.
Member names must be valid xref:index.adoc#tsdl-ident[TSDL identifiers].
|No specific context field type
|[[payload-ft-prop]]`payload-field-type`
|xref:struct-ft-obj.adoc[Structure field type object] or string
|
xref:how-barectf-works:ctf-primer.adoc#er[Payload field] type of
this event record type.
If this property's value is a string, it must be the name of an existing
xref:trace-type-obj.adoc#ft-aliases-prop[field type alias].
For each member `__NAME__` of this property, the
xref:tracing-funcs:index.adoc[tracing function] which barectf generates
for this event record type has an additional parameter named
`p___NAME__`.
Member names must be valid xref:index.adoc#tsdl-ident[TSDL identifiers].
|No payload field type
|[[include-prop]]`$include`
|Sequence of strings.
|See xref:include.adoc[].
|No inclusions
|===
== Examples
.Basic event record type object.
====
[source,yaml]
----
payload-field-type:
class: structure
members:
- msg: string
----
====
.Event record type object with a <<ll-prop,log level>>.
====
[source,yaml]
----
log-level: 12
payload-field-type:
class: structure
members:
- msg: string
----
====
.Event record type object with a <<ll-prop,log level>> (using a xref:trace-type-obj.adoc#ll-aliases-prop[log level alias]).
====
[source,yaml]
----
log-level: CRITICAL
payload-field-type:
class: structure
members:
- msg: string
----
====
.Event record type object with a <<spec-ctx-ft-prop,specific context field type>>.
====
[source,yaml]
----
specific-context-field-type:
class: structure
members:
- count:
field-type:
class: signed-integer
size: 32
payload-field-type:
class: structure
members:
- msg: string
----
====
.Event record type object with <<include-prop,inclusions>>.
====
[source,yaml]
----
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]
----
====
|