Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: rename flag to disable template insights#21329

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
code-asher wants to merge1 commit intomain
base:main
Choose a base branch
Loading
fromasher/rename-disable-insights

Conversation

@code-asher
Copy link
Member

@code-ashercode-asher commentedDec 19, 2025
edited
Loading

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-enable kind of sounds like "enable the usageof stats" rather than "enable the collection of usage stats". But if I flip it around likeusage-stats-enable then 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):

usageStats:  enable: boolean

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):

stats:  agent:    enable: boolean  app:    enable: boolean

Because this affects more than just the template insightspage (specifically it also affects the deployment stats endpoint whichis shown on bottom bar and Prometheus), the group is being renamedgenerically to just "stats".  In the future if we need to affect theother stats we can put those options here.Then, because this change only affects a portion of stats, specificallyusage stats like connection and application time, bytes sent, etc, add anew sub-group called "usage".Then finally add back the "enable" flag.  This also gives us a place toone day place an "anonymize" flag if we need to go that route.
Copy link
Member

@mafredrimafredri left a comment
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Changes are fine, but I'd be happy if we could improve the name a bit. WDYT about my suggestion?

(I agree that splitting them up is not better for the user, and ultimately results in weird UX since some stats are there and others are not.)

bar displays. Disabling will also prevent Prometheus collection of
these values.
INTROSPECTION / STATS / USAGE OPTIONS:
--stats-usage-enable bool, $CODER_STATS_USAGE_ENABLE (default: true)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

It might be worth introducing a bit of repetition here,--stats-usage-stats-enable. Might short-circuit a brain but at least it gives you a better hint in the end.

Or even wordier:--stats-collect-usage-stats-enable.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

or what about--stats-collection-enable

Copy link
Member

@aslilacaslilac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

makes sense

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@mafredrimafredrimafredri left review comments

@aslilacaslilacaslilac approved these changes

Assignees

@code-ashercode-asher

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@code-asher@mafredri@aslilac

[8]ページ先頭

©2009-2025 Movatter.jp