-
Notifications
You must be signed in to change notification settings - Fork 887
Add monitoring package #1446
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
Add monitoring package #1446
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1446 +/- ##
==========================================
- Coverage 67.16% 67.09% -0.07%
==========================================
Files 287 293 +6
Lines 19331 19816 +485
Branches 244 258 +14
==========================================
+ Hits 12984 13296 +312
- Misses 5006 5150 +144
- Partials 1341 1370 +29
Continue to review full report at Codecov.
|
30a342b
to
7f85a50
Compare
coderd/monitoring/monitoring.go
Outdated
// coreRegistry registers metrics that will be sent when the telemetry level | ||
// is `core` or `all`. | ||
coreRegistry *prometheus.Registry | ||
// internalRegisry registers metrics that will never be sent. | ||
internalRegistry *prometheus.Registry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be syntactically nice to align all registries in this struct!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean alignment like horizontally with spaces? Go seems to format it back to this each time I edit 😱
6a42783
to
0da2940
Compare
00ecb29
to
2105111
Compare
This lets us retrieve all workspaces (for telemetry purposes).
This lets us get all the latest resources (for telemetry purposes).
2105111
to
ec7ffbf
Compare
ping @kylecarbs |
@code-asher is this still happening? Or could we close until we come back to it? |
This is superseded by #2273! @code-asher we good to close? |
Close ahoy! |
Feel free to rip this apart...in fact please do I have no idea what I am doing
I am not in any way attached to the names and structure of things here and I feel like if I knew Go better there would probably be better ways
For example maybe the thing that holds the registries (latest iteration is pretty good imoMonitor
) should be separate from the thing that periodically refreshes metrics because there are other metrics external fromMonitor
already (like the web socket count) so seems weird that some metrics are internal to it and others are external. Or maybe we should go the reverse and put all metric stuff inMonitor
rather than allow external registrations but then the metrics need to be exposed so callers can increment/decrement them which is weird because it allows all code to do that rather than just the code that needs to