chore: rename flag to disable template insights #21329
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Because this affects more than just the template insights page (specifically it also affects the deployment stats endpoint which is shown on bottom bar and Prometheus), the group is being renamed generically to just "stats". In the future if we need to affect all stats or the other stats we can put those options here.
Then, because this flag only affects a portion of stats, specifically usage stats like connection and application time, bytes sent, etc, add a new sub-group called "usage".
Then finally add back the "enable" flag. This also gives us a place to one day place an "anonymize" flag if we need to go that route.
What do y'all think? One unfortunate thing about this name is that
--stats-usage-enablekind of sounds like "enable the usage of stats" rather than "enable the collection of usage stats". But if I flip it around likeusage-stats-enablethen there is no longer a section that can affect all stats, not just usage stats, if we need that one day (but maybe we will never need that):We could maybe do something like have two vars that separately control the agent and app stat tables, but although that lines up nicely code-wise, not sure it would make sense to a user unless they know what the database schema looks like (of course the descriptions would help though):