Return null instead of provided attributes (#713)

"A set of span Attributes that will also be added to the Span"
This commit is contained in:
Tobias Bachert 2022-06-16 14:17:29 +02:00 committed by GitHub
parent 3c6c53bf2f
commit 345f8bf35b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ class AlwaysOnSampler implements SamplerInterface
return new SamplingResult(
SamplingResult::RECORD_AND_SAMPLE,
$attributes,
null,
$traceState
);
}

View File

@ -60,7 +60,7 @@ class TraceIdRatioBasedSampler implements SamplerInterface
$traceIdCondition = $lowerOrderBytes < round($this->probability * $traceIdLimit);
$decision = $traceIdCondition ? SamplingResult::RECORD_AND_SAMPLE : SamplingResult::DROP;
return new SamplingResult($decision, $attributes, $traceState);
return new SamplingResult($decision, null, $traceState);
}
public function getDescription(): string