Crate opentelemetry_zpages

Source
Expand description

ZPages implementation for Opentelemetry

This crate is deprecated and no longer maintained.

§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 = SdkTracerProvider::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§

TracezQuerier
Provide wrapper functions to query the aggregated span info.
ZPagesSpanProcessorDeprecated
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§

TracezError
Tracez API’s error.
TracezResponse
Tracez APIs’ response

Functions§

tracezDeprecated
Create tracez components. This function will return a ZPagesSpanProcessor that should be installed into the SdkTracerProvider and a TracezQuerier for http server to access the aggregated information on spans.