This repository was archived by the owner on Dec 23, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
core/java/com/google/instrumentation/stats Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,12 @@ public final class TagKey {
2222 public static final int MAX_LENGTH = StringUtil .MAX_LENGTH ;
2323
2424 /**
25- * Constructs a new {@link TagKey} from the given string.
25+ * Constructs a new {@link TagKey} from the given string. The string will be sanitize such that:
26+ * <ol>
27+ * <li>length is restricted to {@link MAX_LENGTH}, strings longer than that will be truncated.
28+ * <li>characters are restricted to printable ascii characters, non-printable characters will be
29+ * replaced by an underscore '_'.
30+ * </ol>
2631 */
2732 public static TagKey create (String key ) {
2833 return new TagKey (key );
Original file line number Diff line number Diff line change @@ -22,7 +22,12 @@ public final class TagValue {
2222 public static final int MAX_LENGTH = StringUtil .MAX_LENGTH ;
2323
2424 /**
25- * Constructs a new {@link TagKey} from the given string.
25+ * Constructs a new {@link TagValue} from the given string. The string will be sanitize such that:
26+ * <ol>
27+ * <li>length is restricted to {@link MAX_LENGTH}, strings longer than that will be truncated.
28+ * <li>characters are restricted to printable ascii characters, non-printable characters will be
29+ * replaced by an underscore '_'.
30+ * </ol>
2631 */
2732 public static TagValue create (String value ) {
2833 return new TagValue (value );
You can’t perform that action at this time.
0 commit comments