Skip to content

Commit 5b36a52

Browse files
authored
InternalTagAdder: defensively guard against null prebuilt tagmap entry (#11962)
(cherry picked from commit 041bd68)
1 parent 26acb27 commit 5b36a52

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

dd-trace-core/src/main/java/datadog/trace/core/tagprocessor/InternalTagsAdder.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@ public void processTags(
3434
}
3535

3636
if (!ddService.toString().equalsIgnoreCase(spanContext.getServiceName())) {
37-
// service name != DD_SERVICE
38-
unsafeTags.set(baseServiceEntry);
37+
if (baseServiceEntry != null) {
38+
// service name != DD_SERVICE
39+
unsafeTags.set(baseServiceEntry);
40+
}
3941
} else {
4042
// as per config consistency, the version tag is added across tracers only if
4143
// the service name is DD_SERVICE and version tag is not manually set

0 commit comments

Comments
 (0)