Skip to content

chore: track workspace resource monitors in telemetry #16776

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 3, 2025

Conversation

hugodutka
Copy link
Contributor

@hugodutka hugodutka commented Mar 3, 2025

Addresses https://github.com/coder/nexus/issues/195. Specifically, just the "tracking templates" requirement:

Tracking in templates

To enable resource alerts, a user must add the resource_monitoring block to a template's coder_agent resource. We'd like to track if customers have any resource monitoring enabled on a per-deployment basis. Even better, we could identify which templates are using resource monitoring.

@hugodutka hugodutka force-pushed the hugodutka/resource-monitor-telemetry branch from 73bafaf to 70900cc Compare March 3, 2025 15:46
@hugodutka hugodutka marked this pull request as ready for review March 3, 2025 16:03
@hugodutka hugodutka requested a review from defelmnq March 3, 2025 16:03
@hugodutka
Copy link
Contributor Author

hugodutka commented Mar 3, 2025

One idea after thinking about the queries here again: maybe it'd be better to use the updated at value rather than created at for fetching the monitors? We'd then also get telemetry updates whenever the monitors are updated.

Copy link
Contributor

@defelmnq defelmnq left a comment

Choose a reason for hiding this comment

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

Just a comment which is more a question than a blocker - but all good !

Thanks a lot @hugodutka 🔥

@stirby
Copy link
Collaborator

stirby commented Mar 3, 2025

/cherry-pick release/2.20

@hugodutka hugodutka force-pushed the hugodutka/resource-monitor-telemetry branch from 70900cc to b92060a Compare March 3, 2025 17:27
@hugodutka
Copy link
Contributor Author

Updated the queries to use updated_at instead of created_at as explained in #16776 (comment).

@hugodutka hugodutka merged commit 24f3445 into main Mar 3, 2025
30 checks passed
@hugodutka hugodutka deleted the hugodutka/resource-monitor-telemetry branch March 3, 2025 17:41
gcp-cherry-pick-bot bot pushed a commit that referenced this pull request Mar 3, 2025
Addresses coder/nexus#195. Specifically, just
the "tracking templates" requirement:

> ## Tracking in templates
> To enable resource alerts, a user must add the resource_monitoring
block to a template's coder_agent resource. We'd like to track if
customers have any resource monitoring enabled on a per-deployment
basis. Even better, we could identify which templates are using resource
monitoring.
@github-actions github-actions bot locked and limited conversation to collaborators Mar 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants