Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x

namespace OpenTelemetry\SDK\Trace\Sampler

Object name File name Summary
AlwaysOffSampler vendor/open-telemetry/sdk/Trace/Sampler/AlwaysOffSampler.php This implementation of the SamplerInterface always skips record.
Example:
```
use OpenTelemetry\Sdk\Trace\AlwaysOffSampler;
$sampler = new AlwaysOffSampler();
```
AlwaysOnSampler vendor/open-telemetry/sdk/Trace/Sampler/AlwaysOnSampler.php This implementation of the SamplerInterface always records.
Example:
```
use OpenTelemetry\Sdk\Trace\AlwaysOnSampler;
$sampler = new AlwaysOnSampler();
```
ParentBased vendor/open-telemetry/sdk/Trace/Sampler/ParentBased.php This implementation of the SamplerInterface that respects parent context's sampling decision
and delegates for the root span.
Example:
```
use OpenTelemetry\API\Trace\ParentBased;
use OpenTelemetry\API\Trace\AlwaysOnSampler
TraceIdRatioBasedSampler vendor/open-telemetry/sdk/Trace/Sampler/TraceIdRatioBasedSampler.php This implementation of the SamplerInterface records with given probability.
Example:
```
use OpenTelemetry\API\Trace\TraceIdRatioBasedSampler;
$sampler = new TraceIdRatioBasedSampler(0.01);
```

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal