Skip to content

Commit 482bd1e

Browse files
authored
Avoid NPE on DSM context extraction (#10491)
1 parent f2f109e commit 482bd1e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dd-trace-core/src/main/java/datadog/trace/core/datastreams/DefaultPathwayContext.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,10 @@ private static class PathwayContextExtractor implements BiConsumer<String, Strin
200200

201201
@Override
202202
public void accept(String key, String value) {
203-
if (PROPAGATION_KEY_BASE64.equalsIgnoreCase(key)) {
203+
if (value != null && PROPAGATION_KEY_BASE64.equalsIgnoreCase(key)) {
204204
try {
205205
extractedContext = decode(timeSource, serviceNameOverride, value);
206-
} catch (IOException ignored) {
206+
} catch (Throwable ignored) {
207207
}
208208
}
209209
}

0 commit comments

Comments
 (0)