put method
Adds a key value pair to the TraceState.
Key is an opaque string up to 256 characters printable. It MUST begin with a lowercase letter, and can only contain lowercase letters a-z, digits 0-9, underscores _, dashes -, asterisks *, and forward slashes /. For multi-tenant vendor scenarios, an at sign (@) can be used to prefix the vendor name. The tenant id (before the '@') is limited to 240 characters and the vendor id is limited to 13 characters. If in the multi-tenant vendor format, then the first character may additionally be numeric.
Value is opaque string up to 256 characters printable ASCII RFC0020 characters (i.e., the range 0x20 to 0x7E) except comma , and =.
Implementation
void put(String key, String value) {
if (_isValidKey(key) &&
_isValidValue(value) &&
size < _MAX_KEY_VALUE_PAIRS) {
_state[key] = value;
}
}