[glean.js] Debug Tags must be limited to 20 chars of alphanum or hyphen
Categories
(Data Platform and Tools :: Glean: SDK, defect)
Tracking
(Not tracked)
People
(Reporter: chutten, Unassigned)
Details
Per docs debug tags must be of limited size and composition, matching [a-zA-Z0-9-]{1,20}. This is presently enforced in glean-core-based SDKs.
A note: there are some glean.js applications out there already using more than 20-character debug tags. We may wish to reach out to the users using them before applying this change or their configurations will go from working to no longer working. (Obviously this'll make it into the release notes, but we know how few people read the release notes. (Everyone's just so gosh darn busy.))
Comment 1•1 year ago
•
|
||
I believe that we are already handling this.
https://github.com/mozilla/glean.js/blob/main/glean/src/core/config.ts#L119
which calls
https://github.com/mozilla/glean.js/blob/fa8e925a3d5654151f58f07fce15289d7a5d02ee/glean/src/core/utils.ts#L169
I also tried to set this on the debug ping viewer via the console by calling Glean.setDebugViewTag("abcdefghijklmnopqrstuvwxyz") and I get an error
(Glean.core.Config) "abcdefghijklmnopqrstuvwxyz" is not a valid `debugViewTag` value. Please make sure the value passed satisfies the regex `^[a-zA-Z0-9-]{1,20}$`.
Where were we seeing the debug tags longer than 20 characters?
If we are missing handling this somewhere, this will be a nice "good first bug" for Glean.js.
Updated•1 year ago
|
| Reporter | ||
Comment 2•1 year ago
|
||
Whoops! That's me miscounting fx-monitor-local-dev as having 21 (it has 20). My bad!
Description
•