Skip to content

Commit 5b06348

Browse files
amarzialidevflow.devflow-routing-intake
andauthored
Avoid extracting the baggage from null values (#11396)
Avoid extracting the baggage from null values Co-authored-by: devflow.devflow-routing-intake <devflow.devflow-routing-intake@kubernetes.us1.ddbuild.io>
1 parent 5df3514 commit 5b06348

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

dd-trace-core/src/main/java/datadog/trace/core/baggage/BaggagePropagator.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,10 @@ private Baggage parseBaggageHeaders(String input) {
209209
}
210210

211211
@Override
212-
public void accept(String key, String value) {
212+
public void accept(String key, @Nullable String value) {
213+
if (value == null) {
214+
return;
215+
}
213216
// Only process tags that are relevant to baggage
214217
if (BAGGAGE_KEY.equalsIgnoreCase(key)) {
215218
Baggage parsed = parseBaggageHeaders(value);

0 commit comments

Comments
 (0)