opentelemetry-traceable-macros 0.1.0

Per-function, multi-instrumentation, dynamically-configurable tracing library on top of opentelemetry-rust
Documentation
  • Coverage
  • 100%
    2 out of 2 items documented0 out of 1 items with examples
  • Size
  • Source code size: 9.8 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 138.71 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 7s Average build duration of successful builds.
  • all releases: 6s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • samugi

Proc-macro implementation of #[traceable].

Instruments a function and makes it "traceable". Traceable functions (aka trace sites) can be dynamically enabled or disabled to turn tracing on and off on a per-function basis.

Span creation is controlled via a per-function bitmask that enables multiple instrumentations to coexist and produce different trace shapes/hierarchies (a function may produce a span for a given instrumentation and not for another). This way, tracing can be controller per-function and per-instrumentation, at runtime.

The traceable macro allows configuring certain parameters of the trace site, such as the span name and attributes.

Important: expanded macros only depend on opentelemetry via the re-exported ::opentelemetry_traceable::opentelemetry namespace. Additional dependencies need to be handled appropriately by adapting manifest files.