Skip to content

Commit

Permalink
Use substring instead of replace
Browse files Browse the repository at this point in the history
  • Loading branch information
Samad Montazeri committed Oct 24, 2023
1 parent 69459be commit 5bea945
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ public <C> Context extract(Context context, @Nullable C carrier, TextMapGetter<C
if (value == null) {
continue;
}
String baggageKey = lowercaseKey.replace(OtTracePropagator.PREFIX_BAGGAGE_HEADER, "");
String baggageKey =
lowercaseKey.substring(OtTracePropagator.PREFIX_BAGGAGE_HEADER.length());
baggageBuilder.put(baggageKey, value);
}
Baggage baggage = baggageBuilder.build();
Expand Down

0 comments on commit 5bea945

Please sign in to comment.