Skip to content

64 Character Feature Flag Key Length Limit #35375

@bhandalflip

Description

@bhandalflip

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

  1. The 64 character key length should be documented.
  2. 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.
  3. 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.
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions