// Render with Asciidoctor
+:version: 3.1
+
ifndef::env-github[]
:toc: left
endif::env-github[]
= barectf
-25 September 2020
+8 March 2022
Philippe Proulx
image::https://barectf.org/barectf-logo.svg[{nbsp}]
https://pypi.python.org/pypi/barectf[image:https://img.shields.io/pypi/v/barectf.svg[]]
-https://ci.lttng.org/job/barectf_master_build[image:https://img.shields.io/jenkins/s/https/ci.lttng.org/barectf_master_build.svg[]]
+https://ci.lttng.org/job/barectf_stable-{version}_build[image:https://img.shields.io/jenkins/s/https/ci.lttng.org/barectf_stable-{version}_build.svg[]]
[.lead]
https://barectf.org/[**_barectf_**] (from _bare_ metal and _CTF_)
This README mostly documents barectf development.
To learn how to use barectf, read its
-https://barectf.org/docs/barectf/[documentation].
+https://barectf.org/docs/barectf/{version}/[documentation].
====
== Install barectf
See the barectf documentation's
-https://barectf.org/docs/barectf/3.0/install.html[Install barectf]
+https://barectf.org/docs/barectf/{version}/install.html[Install barectf]
page.
== Build barectf
== Build the barectf documentation
This repository contains an
-https://docs.antora.org/antora/2.3/component-version/[Antora
+https://docs.antora.org/antora/latest/component-version/[Antora
documentation component version] under the `docs` directory.
This component version is the source of the
-https://barectf.org/docs/[barectf documentation website].
+https://barectf.org/docs/{version}/[barectf documentation website]
+(version{nbsp}{version}).
You can refer to this component version in your
-https://docs.antora.org/antora/2.3/playbook/[Antora playbook file],
+https://docs.antora.org/antora/latest/playbook/[Antora playbook file],
for example:
[source,yaml]
content:
sources:
- url: https://github.com/efficios/barectf
- branches: [stable-3.0]
+ branches: [stable-3.1]
start_path: docs
# ...
ui:
== Get help
See the barectf documentation's
-https://barectf.org/docs/barectf/3.0/get-help.html[Get help]
+https://barectf.org/docs/barectf/{version}/get-help.html[Get help]
page.
-= What's new in barectf{nbsp}3.1?
+= What's new in barectf{nbsp}{page-component-display-version}?
-TODO!
+Thanks to a https://review.lttng.org/c/barectf/+/7496[contribution from
+Jon Lamb], the xref:how-barectf-works:ctf-primer.adoc#pkt[CTF packets]
+which a barectf-generated tracer writes can contain an
+automatically-incremented **sequence number** in their context field.
+This is useful for a trace reader/analyzer to detect packets lost at
+transport time, for example. https://babeltrace.org/[Babeltrace{nbsp}2]
+supports such a packet context field out of the box.
+
+To enable this new packet feature, set the
+xref:yaml:dst-obj.adoc#seq-num-ft-prop[`sequence-number-field-type`
+property] of the packet features object, for example:
+
+.Data stream type object with an enabled packet sequence number field type feature.
+====
+[source,yaml]
+----
+$features:
+ packet:
+ sequence-number-field-type: true
+event-record-types:
+ # ...
+----
+====
+
+This feature is disabled (false) by default to avoid breaking changes.
+
+The xref:platform:api.adoc#close[packet closing function] automatically
+increments the current packet sequence number of the barectf context.
+Within platform code, you can get the current value with
+xref:platform:api.adoc#barectf-pkt-seq-num-func[`barectf_packet_sequence_number()`].