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