Skip to content

Commit

Permalink
SpanBuilder.withTag(name, "") should behave like span.setTag(name, ""…
Browse files Browse the repository at this point in the history
…) and map empty strings to null, ie. remove the tag (#5155)
  • Loading branch information
mcculls authored and ValentinZakharov committed May 5, 2023
1 parent 858f631 commit 7b56c83
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1272,7 +1272,7 @@ public CoreSpanBuilder withTag(final String tag, final Number number) {

@Override
public CoreSpanBuilder withTag(final String tag, final String string) {
return withTag(tag, (Object) string);
return withTag(tag, (Object) (string == null || string.isEmpty() ? null : string));
}

@Override
Expand Down

0 comments on commit 7b56c83

Please sign in to comment.