1 = Write a barectf YAML configuration file
3 A barectf configuration controls how barectf generates a tracer, for
6 * What are the event record types for which to generate
7 xref:tracing-funcs:index.adoc[tracing functions]?
9 In other words, what are the tracing function names and what are their
10 parameter types and names?
12 * Does a data stream have a clock source? If so, what's the clock source
13 function's return C{nbsp}type?
15 * What's the identifier prefix for the C{nbsp}source code which barectf
18 By default, a tracing function name could be
19 `+barectf_trace_my_stream_my_event()+`, but it can also be
20 `+my_company_trace_my_stream_my_event()+`.
22 barectf supports two methods to write a configuration:
24 . Create and assemble configuration objects with the barectf Python API
27 . Write a configuration in https://yaml.org/[YAML].
29 This section is about method{nbsp}2.
31 Read xref:yaml-primer.adoc[] to learn more about the YAML language.
33 A barectf YAML configuration document is a
34 xref:yaml:cfg-obj.adoc[configuration object].
38 In a barectf YAML configuration, a xref:yaml-primer.adoc#scalar[null
39 value] always means to use the default value.
41 This is useful when taking into account the xref:include.adoc[partial
42 YAML file inclusion] or xref:ft-obj.adoc#inherit[field type object
43 inheritance] features: the overriding object can reset properties to
50 barectf goes through the following stages when it processes a YAML
53 . xref:include.adoc[Include], recursively, partial YAML files.
55 . Expand xref:trace-type-obj.adoc#ft-aliases-prop[field type aliases].
57 Replace every field type alias with its full xref:ft-obj.adoc[field type
60 . Apply xref:ft-obj.adoc#inherit[field type object inheritance].
62 . Expand xref:trace-type-obj.adoc#ll-aliases-prop[log level aliases].
64 Replace every log level alias with its numeric value.
66 . Normalize property values.
68 If more than one value mean the same thing (for example,
69 xref:common-values.adoc#byte-order[`be` and
70 `big-endian`]), prefer one version.
72 A xref:cfg-obj.adoc[configuration object], after step{nbsp}5, is known
73 as an _effective configuration object_. The
74 xref:cli:usage.adoc#show-effective-configuration-command[`barectf show-effective-configuration`
75 CLI command] shows the effective version of a YAML configuration file.
80 Many barectf YAML objects require that a given string key or value
81 be a valid TSDL (Trace Stream Description Language) identifier.
83 As per https://diamon.org/ctf/v1.8.3/[CTF{nbsp}1.8.3], a valid TSDL
84 identifier is any valid C{nbsp}identifier which is __not__ one of: