Module passage_sampler_probabilistic

Probabilistic Sampler.

Copyright © 2017 Takeru Ohta <phjgt308@gmail.com>

Behaviours: passage_sampler.

Description

Probabilistic Sampler.

This sampler samples the spans probabilistically.

Examples

  Context = passage_span_context_null,
  Sampler = passage_sampler_probabilistic:new(0.5),
  Reporter = passage_reporter_null:new(),
 
  ok = passage_tracer_registry:register(foo, Context, Sampler, Reporter).

Function Index

new/1Makes a new sampler.

Function Details

new/1

new(SamplingRate::float()) -> passage_sampler:sampler()

Makes a new sampler.

This will sample spans by the given SamplingRate. E.g., if SamplingRate = 0.5, the half of the spans are sampled probabilistically.

The value of SamplingRate must be between 0.0 and 1.0.


Generated by EDoc