Skip to content

Commit 76191ba

Browse files
committed
Use proper method invocation syntax
Remove unused consts
1 parent 3f2b330 commit 76191ba

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

propagators/aws/xray/AwsXrayPropagator.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,23 +42,19 @@
4242
class AwsXrayPropagator implements TextMapPropagatorInterface
4343
{
4444
public const AWSXRAY_TRACE_ID_HEADER = 'x-amzn-trace-id';
45-
private const HEADER_TYPE = 'string';
4645
private const VERSION_NUMBER = '1';
4746
private const TRACE_HEADER_DELIMITER = ';';
4847
private const KV_DELIMITER = '=';
4948

5049
private const TRACE_ID_KEY = 'Root';
51-
private const TRACE_ID_LENGTH = 32;
52-
private const TRACE_ID_VERSION = '1';
5350
private const TRACE_ID_DELIMITER = '-';
5451
private const TRACE_ID_TIMESTAMP_LENGTH = 8;
5552
private const VERSION_NUMBER_INDEX = 0;
5653
private const TIMESTAMP_INDEX = 1;
5754
private const RANDOM_HEX_INDEX = 2;
5855

5956
private const PARENT_ID_KEY = 'Parent';
60-
private const SPAN_ID_LENGTH = 16;
61-
57+
6258
private const SAMPLED_FLAG_KEY = 'Sampled';
6359
private const IS_SAMPLED = '1';
6460
private const NOT_SAMPLED = '0';
@@ -130,13 +126,13 @@ public function extract($carrier, PropagationGetterInterface $getter = null, Con
130126
if ($componentPair[0] === self::PARENT_ID_KEY) {
131127
$parsedSpanId = $componentPair[1];
132128
} elseif ($componentPair[0] === self::TRACE_ID_KEY) {
133-
$parsedTraceId = self::parseTraceId($componentPair[1]);
129+
$parsedTraceId = $this->parseTraceId($componentPair[1]);
134130
} elseif ($componentPair[0] === self::SAMPLED_FLAG_KEY) {
135131
$sampledFlag = $componentPair[1];
136132
}
137133
}
138134

139-
if (!self::isValidSampled($sampledFlag)) {
135+
if (!$this->isValidSampled($sampledFlag)) {
140136
return $context;
141137
}
142138

0 commit comments

Comments
 (0)