Skip to content
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

Merged
merged 1 commit into from
Jun 23, 2015

Conversation

siavashs
Copy link
Contributor

@siavashs siavashs commented May 5, 2015

No description provided.

}

func (e *Exporter) setMetrics(scrapes <-chan []string) {
for row := range scrapes {
var comRegex, _ = regexp.Compile(`^com_(.*)$`)
Copy link
Contributor

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.

@juliusv
Copy link
Member

juliusv commented Jun 3, 2015

Status on this one? I saw one more commit being pushed after @brian-brazil's last comment.

@siavashs
Copy link
Contributor Author

siavashs commented Jun 6, 2015

@juliusv the last commit should fix the issues that @brian-brazil has mentioned in comments.
@brian-brazil would you please check the updated code?

for row := range scrapes {
var comRegex = regexp.MustCompile(`^com_(.*)$`)
var connectionErrorRegex = regexp.MustCompile(`^connection_errors_(.*)$`)
var handlerRegex = regexp.MustCompile(`^handler_(.*)$`)
Copy link
Contributor

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

@brian-brazil
Copy link
Contributor

👍

@juliusv
Copy link
Member

juliusv commented Jun 23, 2015

@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.
@siavashs
Copy link
Contributor Author

@juliusv done :)

@juliusv
Copy link
Member

juliusv commented Jun 23, 2015

Woot, thanks! Merging. :)

juliusv added a commit that referenced this pull request Jun 23, 2015
Moved all mysql commands to mysql_commands_total and use Untyped for all other metrics.
@juliusv juliusv merged commit 6803bc6 into prometheus:master Jun 23, 2015
@siavashs
Copy link
Contributor Author

No problem ;)

ezraroi pushed a commit to ezraroi/mysqld_exporter that referenced this pull request Apr 17, 2018
# 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants