rama::http::dep::core::telemetry::opentelemetry::sdk

Module trace

Expand description

§OpenTelemetry Trace SDK

The tracing SDK consist of a few main structs:

  • The SdkTracer struct which performs all tracing operations.
  • The Span struct with is a mutable object storing information about the current operation execution.
  • The SdkTracerProvider struct which configures and produces SdkTracers.

Structs§

  • Batch span processor configuration. Use BatchConfigBuilder to configure your own instance of BatchConfig.
  • A builder for creating BatchConfig instances.
  • The BatchSpanProcessor collects finished spans in a buffer and exports them in batches to the configured SpanExporter. This processor is ideal for high-throughput environments, as it minimizes the overhead of exporting spans individually. It uses a dedicated background thread to manage and export spans asynchronously, ensuring that the application’s main execution flow is not blocked.
  • Builder for BatchSpanProcessorDedicatedThread.
  • Tracer configuration
  • Default IdGenerator implementation.
  • Tracer implementation to create and manage spans
  • Creator and registry of named SdkTracer instances.
  • A SpanProcessor that passes finished spans to the configured SpanExporter, as soon as they are finished, without any batching. This is typically useful for debugging and testing. For scenarios requiring higher performance/throughput, consider using BatchSpanProcessor. Spans are exported synchronously in the same thread that emits the log record. When using this processor with the OTLP Exporter, the following exporter features are supported:
  • Single operation within a trace.
  • SpanData contains all the information collected by a Span and can be used by exporters as a standard input.
  • Stores span events along with dropped count.
  • Span limit configuration to keep attributes, events and links to a span in a reasonable number.
  • Stores span links along with dropped count.
  • Tracer implementation to create and manage spans
  • Builder for provider attributes.

Enums§

Traits§

  • Interface for generating IDs
  • The ShouldSample interface allows implementations to provide samplers which will return a sampling SamplingResult based on information that is typically available just before the Span was created.
  • SpanExporter defines the interface that protocol-specific exporters must implement so that they can be plugged into OpenTelemetry SDK and support sending of telemetry data.
  • SpanProcessor is an interface which allows hooks for span start and end method invocations. The span processors are invoked only when is_recording is true.

Functions§

  • configDeprecated
    Default trace configuration