View Source otel_sampler_parent_based (opentelemetry v1.5.0)

An otel_sampler that makes the decision based on the parent.

This sampler decides with the following possibilities:
  1. a remote parent that is sampled (by default always_on);
  2. a remote parent that is not sampled (by default always_off);
  3. a local parent that is sampled (by default always_on);
  4. a local parent that is not sampled (by default always_off);
  5. no parent (by default always_on).

For each of these cases a different sampler can be configured. For options, see opts().

This is one of the built-in samplers provided by the OpenTelemetry SDK.

Summary

Types

Options to configure this sampler.

Types

-type opts() ::
    #{remote_parent_sampled => otel_sampler:sampler_spec(),
      remote_parent_not_sampled => otel_sampler:sampler_spec(),
      local_parent_sampled => otel_sampler:sampler_spec(),
      local_parent_not_sampled => otel_sampler:sampler_spec(),
      root => otel_sampler:sampler_spec()}.
Options to configure this sampler.