tracing-actions

Crates.iotracing-actions
lib.rstracing-actions
version0.3.1
sourcesrc
created_at2023-05-09 03:17:43.224181
updated_at2023-06-23 21:30:21.303614
descriptionTracing subscriber that vends action trace structures to a callback
homepage
repositoryhttps://github.com/kvc0/tracing-actions
max_upload_size
id860220
size29,878
kvc0 (kvc0)

documentation

README

tracing-actions

Tracing-actions is a tracing extension for recording service functions.

It gives you a tracing subscriber to which you can supply a callback. The tracing crate is highly general, and that generality is more than some uses need.

If you are trying to send opentelemetry line protocol traces to some service, you need to materialize whole spans to build up OTLP messages. The ActionTraceSubscriber gives you a callback for each completed span. It was made with OTLP in mind, but ActionTraces can be used for any number of other destinations.

Spans used by ActionTraceSubscriber can be optimistically cached, if you use the LazySpanCache. That feature is a simple best-effort racing cache. If 2 threads need a span at the same instant, one gets a cached span and the other makes a new one. They both try to return the new span to the cache upon completion, and if the cache is full the span is simply dropped.

Commit count: 25

cargo fmt