Skip to content

Commit e889bb1

Browse files
authored
Make private static fields final (#256)
* Update to static final fields Also fixes a typo * Change logger name to fully qualified name
1 parent b391c4a commit e889bb1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

propagators/gcp/src/main/java/com/google/cloud/opentelemetry/propagators/XCloudTraceContextPropagator.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,12 @@
3939
*/
4040
public final class XCloudTraceContextPropagator implements TextMapPropagator {
4141

42-
private static String FIELD = "x-cloud-trace-context";
43-
private static Collection<String> FIELDS = Collections.singletonList(FIELD);
44-
private static Pattern VALUE_PATTERN =
42+
private static final String FIELD = "x-cloud-trace-context";
43+
private static final Collection<String> FIELDS = Collections.singletonList(FIELD);
44+
private static final Pattern VALUE_PATTERN =
4545
Pattern.compile("(?<traceid>[0-9a-f]{32})\\/(?<spanid>[\\d]{1,20});o=(?<sampled>\\d+)");
46-
private static Logger LOGGER = Logger.getLogger("XCloudTraceContextPropogator");
46+
private static final Logger LOGGER =
47+
Logger.getLogger(XCloudTraceContextPropagator.class.getCanonicalName());
4748

4849
private final boolean oneway;
4950

0 commit comments

Comments
 (0)