Skip to content

Commit aef0e0d

Browse files
committed
nit
1 parent 4302b32 commit aef0e0d

File tree

1 file changed

+2
-1
lines changed
  • hypertrace-trace-enricher/hypertrace-trace-enricher-impl/src/main/java/org/hypertrace/traceenricher/enrichment/enrichers

1 file changed

+2
-1
lines changed

hypertrace-trace-enricher/hypertrace-trace-enricher-impl/src/main/java/org/hypertrace/traceenricher/enrichment/enrichers/HttpAttributeEnricher.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import java.nio.charset.StandardCharsets;
1111
import java.util.List;
1212
import java.util.Map;
13+
import java.util.Optional;
1314
import org.apache.commons.lang3.StringUtils;
1415
import org.apache.commons.lang3.tuple.Pair;
1516
import org.hypertrace.core.datamodel.AttributeValue;
@@ -48,7 +49,7 @@ public void enrichEvent(StructuredTrace trace, Event event) {
4849
.ifPresent(
4950
queryString -> {
5051
String spanId =
51-
event.getEventId() == null ? null : HexUtils.getHex(event.getEventId());
52+
Optional.ofNullable(event.getEventId()).map(HexUtils::getHex).orElse(null);
5253
Map<String, List<String>> paramNameToValues =
5354
getQueryParamsFromQueryString(queryString, spanId);
5455
for (Map.Entry<String, List<String>> queryParamEntry : paramNameToValues.entrySet()) {

0 commit comments

Comments
 (0)