#user-events #tracepoints #trace-logging #logging #trace #linux #eventheader

no-std eventheader_dynamic

Rust API for runtime-specified eventheader-encoded Linux Tracepoints via user_events

9 releases

0.4.0 Apr 12, 2024
0.3.5 Feb 27, 2024
0.3.4 Nov 27, 2023
0.3.3 Aug 23, 2023
0.1.0 May 9, 2023

#364 in Unix APIs

Download history 41/week @ 2024-01-16 15/week @ 2024-01-30 8/week @ 2024-02-06 28/week @ 2024-02-13 69/week @ 2024-02-20 243/week @ 2024-02-27 5/week @ 2024-03-05 224/week @ 2024-03-12 78/week @ 2024-03-19 23/week @ 2024-03-26 61/week @ 2024-04-02 174/week @ 2024-04-09 16/week @ 2024-04-16

190 downloads per month
Used in opentelemetry-user-events…

MIT license

200KB
2K SLoC

EventHeader for Rust

Crates.io Documentation MIT licensed Build Status maintenance status

The eventheader_dynamic crate provides a flexible way to log EventHeader-encoded Tracepoints via the Linux user_events system. The events can be generated and collected on Linux 6.4 or later (requires the user_events kernel feature to be enabled, the tracefs or debugfs filesystem to be mounted, and appropriate permissions configured for the /sys/kernel/.../tracing/user_events_data file).

This "dynamic" implementation is more flexible than the implementation in the eventheader crate. For example, it supports runtime-defined schema and can easily log arrays of strings. However, it is harder to use, it has higher runtime costs, and it depends on the alloc crate. This dynamic implementation is intended for use only when the set of events cannot be determined at compile-time. For example, eventheader_dynamic might be used to implement a middle-layer library providing tracing support to a scripting language like JavaScript or Python. In other cases, use the eventheader crate instead of this crate.

Dependencies