-
Notifications
You must be signed in to change notification settings - Fork 760
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
Moved all mysql commands to mysql_commands_total and use Untyped for all other metrics. #4
Conversation
} | ||
|
||
func (e *Exporter) setMetrics(scrapes <-chan []string) { | ||
for row := range scrapes { | ||
var comRegex, _ = regexp.Compile(`^com_(.*)$`) |
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.
Use MustCompile here. This'd be better as a global constant.
Status on this one? I saw one more commit being pushed after @brian-brazil's last comment. |
@juliusv the last commit should fix the issues that @brian-brazil has mentioned in comments. |
for row := range scrapes { | ||
var comRegex = regexp.MustCompile(`^com_(.*)$`) | ||
var connectionErrorRegex = regexp.MustCompile(`^connection_errors_(.*)$`) | ||
var handlerRegex = regexp.MustCompile(`^handler_(.*)$`) |
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.
I don't think these make sense as one metric, they're all for very different things
👍 |
@siavashs Woot. Could you squash your commmits so I can merge? |
Use Untyped for all other metrics. Parse directly to float and remove all value conversions.
@juliusv done :) |
Woot, thanks! Merging. :) |
Moved all mysql commands to mysql_commands_total and use Untyped for all other metrics.
No problem ;) |
# This is the 1st commit message: Move session params to DSN (prometheus#259) * Move session params to DSN In order to avoid lost session params if the `db` object reconnects in the background, move session params to the DSN string configuration. * Move log_slow_filter flag to exporter * Update flag name to be in `exporter` namespace. * Update README. * Tweak exporter.log_slow_filter flag documentation. # This is the commit message prometheus#2: Fix lock_wait_timeout after prometheus#259 (prometheus#263) # This is the commit message prometheus#3: Broken landing page, doesn't include metric path. (prometheus#264) * Broken landing page, doesn't include metric path. * Fix landing page. # This is the commit message prometheus#4: first commit Signed-off-by: Roi Ezra <[email protected]> # This is the commit message prometheus#5: fixed code review Signed-off-by: Roi Ezra <[email protected]> # This is the commit message prometheus#6: fixed code review Signed-off-by: Roi Ezra <[email protected]>
No description provided.