Skip to content

Commit 6b4517f

Browse files
committed
changed variable names
1 parent 16ad65b commit 6b4517f

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

aws-xray-propagator/src/main/java/io/opentelemetry/contrib/awsxray/propagator/AwsXrayPropagator.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ public final class AwsXrayPropagator implements TextMapPropagator {
7474
private static final int LINEAGE_MAX_LENGTH = 18;
7575
private static final int LINEAGE_MIN_LENGTH = 12;
7676
private static final int LINEAGE_HASH_LENGTH = 8;
77-
private static final int LINEAGE_MAX_LOOP_COUNTER = 32767;
78-
private static final int LINEAGE_MAX_REQUEST_COUNTER = 255;
77+
private static final int LINEAGE_MAX_COUNTER1 = 32767;
78+
private static final int LINEAGE_MAX_COUNTER2 = 255;
7979
private static final int LINEAGE_MIN_COUNTER = 0;
8080
private static final String INVALID_LINEAGE = "-1:11111111:0";
8181

@@ -341,16 +341,16 @@ private static String parseLineageHeader(String xrayLineageHeader) {
341341
private static boolean isValidLineage(String key) {
342342
String[] split = key.split(String.valueOf(LINEAGE_DELIMITER));
343343
String hash = split[1];
344-
int loopCounter = parseIntOrReturnNegative(split[0]);
345-
int requestCounter = parseIntOrReturnNegative(split[2]);
344+
int counter1 = parseIntOrReturnNegative(split[0]);
345+
int counter2 = parseIntOrReturnNegative(split[2]);
346346

347347
boolean isHashValid = hash.length() == LINEAGE_HASH_LENGTH && isValidBase16String(hash);
348-
boolean isValidRequestCounter =
349-
requestCounter <= LINEAGE_MAX_REQUEST_COUNTER && requestCounter >= LINEAGE_MIN_COUNTER;
350-
boolean isValidLoopCounter =
351-
loopCounter <= LINEAGE_MAX_LOOP_COUNTER && loopCounter >= LINEAGE_MIN_COUNTER;
348+
boolean isValidCounter2 =
349+
counter2 <= LINEAGE_MAX_COUNTER2 && counter2 >= LINEAGE_MIN_COUNTER;
350+
boolean isValidCounter1 =
351+
counter1 <= LINEAGE_MAX_COUNTER1 && counter1 >= LINEAGE_MIN_COUNTER;
352352

353-
return isHashValid && isValidRequestCounter && isValidLoopCounter;
353+
return isHashValid && isValidCounter2 && isValidCounter1;
354354
}
355355

356356
@Nullable

0 commit comments

Comments
 (0)