feat: add flag to disable template insights (#20940)

Closes #20399 

To summarize the original commit messages:

- Do not log stats to the database.
- Return errors on the insight endpoints.
- Update the frontend to show those errors.
- Also fixes an issue with getting the user status count via codersdk,
since I added a test to ensure it was not disabled by this flag and it
was sending the wrong payload.
This commit is contained in:
Asher
2025-12-14 03:00:03 +00:00
committed by GitHub
parent b9f8295845
commit 27f0413347
19 changed files with 1615 additions and 979 deletions
+11
View File
@@ -269,6 +269,17 @@ URL to fetch a DERP mapping on startup. See: https://tailscale.com/kb/1118/custo
Path to read a DERP mapping from. See: https://tailscale.com/kb/1118/custom-derp-servers/.
### --template-insights-enable
| | |
|-------------|----------------------------------------------------|
| Type | <code>bool</code> |
| Environment | <code>$CODER_TEMPLATE_INSIGHTS_ENABLE</code> |
| YAML | <code>introspection.templateInsights.enable</code> |
| Default | <code>true</code> |
Enable the collection and display of template insights along with the associated API endpoints. This will also enable aggregating these insights into daily active users, application usage, and transmission rates for overall deployment stats. When disabled, these values will be zero, which will also affect what the bottom deployment overview bar displays. Disabling will also prevent Prometheus collection of these values.
### --prometheus-enable
| | |