-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Documentation Page
https://docs.datadoghq.com/getting_started/feature_flags/
Issue Description
There is no documentation around the character length limit on a Datadog feature flag key. However, in practice, when I tried to create a new feature flag at:
/feature-flags/create
I copy-pasted a flag key value from my code that was greater than 64 characters into the "Flag key*" mandatory field, and the value I pasted was truncated to exactly 64 characters. I then tried appending the missing part to the key, and no further characters were added.
Based on the above behaviour, I conclude that Datadog has a 64 character limit on key length. I figure this because otherwise, it's a pretty big coincidence that Datadog accidentally prevents me creating a key with more than exactly 64 characters; 64 being a popular number in computers. However, I'll admit that my conclusion may be wrong, and in that case, the rest of this issue isn't really applicable. Instead, the issue would be a proper bug in the feature flagging system.
Expectations
- The 64 character key length should be documented.
- Users should be encourages to create a key first in Datadog, and then use that key in code => This would avoid people shipping code with an oversized key and then having to submit a subsequent PR to fix it.
- When the user tries to paste a value of 65 or more characters into "Flag key*", the UI should clearly reject it with a validation error indicating that the maximum key length of 64 cannot be exceeded.
- When the user tries to type more characters into "Flag key*", after 64 characters are already in there, the UI should clearly reject the additional keystrokes with a validation error indicating that the maximum key length of 64 cannot be exceeded.
The final two points are not strictly documentation issues; they are POLA violations in the UI. But it's all related.