class SamplingResult
Hierarchy
- class \OpenTelemetry\SDK\Trace\SamplingResult
Expanded class hierarchy of SamplingResult
4 files declare their use of SamplingResult
- AlwaysOffSampler.php in vendor/
open-telemetry/ sdk/ Trace/ Sampler/ AlwaysOffSampler.php - AlwaysOnSampler.php in vendor/
open-telemetry/ sdk/ Trace/ Sampler/ AlwaysOnSampler.php - ParentBased.php in vendor/
open-telemetry/ sdk/ Trace/ Sampler/ ParentBased.php - TraceIdRatioBasedSampler.php in vendor/
open-telemetry/ sdk/ Trace/ Sampler/ TraceIdRatioBasedSampler.php
File
-
vendor/
open-telemetry/ sdk/ Trace/ SamplingResult.php, line 9
Namespace
OpenTelemetry\SDK\TraceView source
final class SamplingResult {
/**
* Span will not be recorded and all events and attributes will be dropped.
*/
public const DROP = 0;
/**
* Span will be recorded but SpanExporters will not receive this Span.
*/
public const RECORD_ONLY = 1;
/**
* Span will be recorder and exported.
*/
public const RECORD_AND_SAMPLE = 2;
/**
* @param ?API\TraceStateInterface $traceState A Tracestate that will be associated with the Span through the new SpanContext.
*/
public function __construct(int $decision, iterable $attributes = [], ?API\TraceStateInterface $traceState = null) {
}
/**
* Return sampling decision whether span should be recorded or not.
*/
public function getDecision() : int {
return $this->decision;
}
/**
* Return attributes which will be attached to the span.
*/
public function getAttributes() : iterable {
return $this->attributes;
}
/**
* Return a collection of links that will be associated with the Span to be created.
*/
public function getTraceState() : ?API\TraceStateInterface {
return $this->traceState;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
SamplingResult::DROP | public | constant | Span will not be recorded and all events and attributes will be dropped. |
SamplingResult::getAttributes | public | function | Return attributes which will be attached to the span. |
SamplingResult::getDecision | public | function | Return sampling decision whether span should be recorded or not. |
SamplingResult::getTraceState | public | function | Return a collection of links that will be associated with the Span to be created. |
SamplingResult::RECORD_AND_SAMPLE | public | constant | Span will be recorder and exported. |
SamplingResult::RECORD_ONLY | public | constant | Span will be recorded but SpanExporters will not receive this Span. |
SamplingResult::__construct | public | function |