Expand description
ZPages implementation for Opentelemetry
§Overview
zPages are an in-process alternative to external exporters. When included, they collect and aggregate tracing and metrics information in the background; this data is served on web pages or APIs when requested.
Currently only tracez components are available. And some of those are still work in progress. Known limitation includes
- The sampled running span doesn’t reflect the changes made to the span.
- The API only returns the json response.
- Users have to build their own http server from the components provided.
§Get start
The first step is to initiate the ZPagesSpanProcessor
and install it in TracerProvider
.
let (processor, querier) = tracez(5, Tokio);
let provider = TracerProvider::builder()
.with_span_processor(processor)
.build();
global::set_tracer_provider(provider);
Once the ZPagesSpanProcessor
installed. It will record spans when they
start or end.
Users can then use the TracezQuerier
to query the aggregated span information.
A detailed example can also be founded here.
Structs§
- Provide wrapper functions to query the aggregated span info.
- ZPagesSpanProcessor is an alternative to external exporters. It sends span data to zPages server where it will be archive and user can use this information for debug purpose.
Enums§
- Tracez API’s error.
- Tracez APIs’ response
Functions§
- Create tracez components. This function will return a
ZPagesSpanProcessor
that should be installed into theTracerProvider
and aTracezQuerier
for http server to access the aggregated information on spans.