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 May 4, 2023
1 parent e41c7fc commit aa78d4f
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 aa78d4f

Please sign in to comment.