-
Notifications
You must be signed in to change notification settings - Fork 641
[ISSUE #2196] [Workflow] Add prometheus metrics #2303
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
Conversation
|
hi @walterlife, could you help to review this pr? |
Codecov Report
@@ Coverage Diff @@
## master #2303 +/- ##
============================================
- Coverage 11.78% 11.77% -0.02%
+ Complexity 903 901 -2
============================================
Files 473 469 -4
Lines 27856 27783 -73
Branches 3000 3000
============================================
- Hits 3284 3272 -12
+ Misses 24276 24216 -60
+ Partials 296 295 -1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
| MetricsSwitchReject = "reject" | ||
| MetricsSwitchPass = "pass" | ||
|
|
||
| MetricsStartRequest = "start_request" |
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.
Is it possible to initialize the metric collector first?
@horoc
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.
updated.
| case gauge: | ||
| return p.histograms[name] | ||
| default: | ||
| panic("prometheus metrics get collector error, illegal collector type") |
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.
try to use error return instead of panic
@horoc
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.
updated.
walterlife
left a comment
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.
LGTM
Fixes #2196
Motivation
#2196
Modifications
#2196
Documentation
None