-
Notifications
You must be signed in to change notification settings - Fork 339
expfmt: throw error when metric's name not provided instead panicing #811
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -1332,6 +1332,16 @@ request_duration_microseconds_count 2693 | |||||||||||||||
| `, | ||||||||||||||||
| errUTF8: `text format parsing error in line 5: negative bucket population for histogram "request_duration_microseconds"`, | ||||||||||||||||
| }, | ||||||||||||||||
| // 40: Metric's name missing. | ||||||||||||||||
| { | ||||||||||||||||
| in: ` | ||||||||||||||||
| # HELP backupmonitor_size The size of the given backup. | ||||||||||||||||
| # TYPE backupmonitor_size counter | ||||||||||||||||
| {host="local", dir="alpha"} 1834194837 | ||||||||||||||||
| {host="remote", dir="beta"} 133638016 | ||||||||||||||||
|
Comment on lines
+1338
to
+1341
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Just to be consistent with previous test cases.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I came across the fact that the error is not displayed at the values as in the previous metrics, so I decided to use these values:
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure I follow. The request is make the test case consistent with what we use in the other test cases. The naming itself should have no effect on the case being tested. |
||||||||||||||||
| `, | ||||||||||||||||
| errUTF8: `text format parsing error in line 4: invalid metric name`, | ||||||||||||||||
| }, | ||||||||||||||||
| } | ||||||||||||||||
| for i, scenario := range scenarios { | ||||||||||||||||
| parser.scheme = model.UTF8Validation | ||||||||||||||||
|
|
||||||||||||||||
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.
This looks like an accident?