Skip to main content

Crate holochain_tracing

Crate holochain_tracing 

Source

Modules§

channel
prelude
reporter
Reporter to the jaeger agent
structured
tracer_console
tracer_network
tracing_macros

Macros§

follow_span
span_wrap_encode

Structs§

AllSampler
This samples all traces.
AndSampler
and combinator.
EncodedSpanContext
Binary representation is exactly 37 bytes, so ideally we would use a [u8; 37], but this is easier…
EncodedSpanWrap
NullSampler
This samples no traces.
OrSampler
or combinator.
PassiveSampler
This samples traces which have one or more references.
ProbabilisticSampler
This samples a certain percentage of traces.
Span
A wrapper around a simple rustracing_jaeger::RjSpan, providing some convenience functions. It overshadows the lower-level child and follower methods with simpler versions. To access the lower-level methods, use .0.
SpanContext
An OpenTracing SpanContext is used to send span info across a process boundary. This is a simple wrapper around that, again with some helper functions.
SpanWrap
SpanWrap is a simple way to couple some data along with a struct. It is common to send some data on a channel which will be used as arguments to a function on the receiving side, where we also want to continue the trace on the receiving side. This struct helps keep that data together with minimal boilerplate.
Tag
Span tag.
Tracer
Tracer.

Traits§

Sampler
Sampler decides whether a new trace should be sampled or not.

Functions§

debug_tag
follow
Add a span to the stack that follows from a SpanWrap
follow_encoded
follow_encoded_tag
is_empty
noop
TODO: use lazy_static / thread_local singleton Tracer
null_tracer
Tracer placeholder (use only as last resort)
push_span
Push a span onto the stack. The value will automatically be popped when the returned guard is dropped, as well as the guards of any subsequently pushed spans
push_span_with
Applies a function to the top of the span stack and pushes the value onto the stack. If the stack is empty, the function will not be executed and None will be returned.
test_span
Dummy span, useful for tests that don’t test tracing
test_wrap
test_wrap_enc
top_follower
If the stack is not empty, return the top item, else return None
with_top
If the stack is not empty, return the top item, else return None
with_top_or_null
If the stack is not empty, return the top item, else return None
wrap
wrap_with_tag

Type Aliases§

BoxSampler
Boxed version of Sampler.
FinishedSpan
Finished span.