1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-17 13:46:47 +02:00
unleash.unleash/src
Nuno Góis eb238f502a
chore: unknown flags (#9837)
https://linear.app/unleash/issue/2-3406/hold-unknown-flags-in-memory-and-show-them-in-the-ui-somehow

This PR introduces a suggestion for a “unknown flags” feature.

When clients report metrics for flags that don’t exist in Unleash (e.g.
due to typos), we now track a limited set of these unknown flag names
along with the appnames that reported them. The goal is to help users
identify and clean up incorrect flag usage across their apps.

We store up to 10 unknown flag + appName combinations, keeping only the
most recent reports. Data is collected in-memory and flushed
periodically to the DB, with deduplication and merging to ensure we
don’t exceed the cap even across pods.

We were especially careful to make this implementation defensive, as
unknown flags could be reported in very high volumes. Writes are
batched, deduplicated, and hard-capped to avoid DB pressure.

No UI has been added yet — this is backend-only for now and intended as
a step toward better visibility into client misconfigurations.

I would suggest starting with a simple banner that opens a dialog
showing the list of unknown flags and which apps reported them.

<img width="497" alt="image"
src="https://github.com/user-attachments/assets/b7348e0d-0163-4be4-a7f8-c072e8464331"
/>
2025-05-07 11:48:36 +01:00
..
lib chore: unknown flags (#9837) 2025-05-07 11:48:36 +01:00
mailtemplates feat: productivity email action text (#8966) 2024-12-12 12:00:08 +01:00
migrations chore: unknown flags (#9837) 2025-05-07 11:48:36 +01:00
test chore: unknown flags (#9837) 2025-05-07 11:48:36 +01:00
migrator.ts chore: Create test db from template (#9265) 2025-02-11 13:01:43 +01:00
server-dev.ts chore: unknown flags (#9837) 2025-05-07 11:48:36 +01:00
server.ts Define exports for enterprise (#2435) 2022-11-17 13:02:40 +02:00