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

Move session params to DSN #259

Merged
merged 3 commits into from
Jan 30, 2018
Merged

Move session params to DSN #259

merged 3 commits into from
Jan 30, 2018

Conversation

SuperQ
Copy link
Member

@SuperQ SuperQ commented Jan 10, 2018

In order to avoid lost session params if the db object reconnects in
the background, move session params to the DSN string configuration.

@SuperQ
Copy link
Member Author

SuperQ commented Jan 10, 2018

/CC @arvenil I think this will fix your concerns in #252

In order to avoid lost session params if the `db` object reconnects in
the background, move session params to the DSN string configuration.
@arvenil
Copy link
Contributor

arvenil commented Jan 10, 2018

@SuperQ You are the best, yes, thank you makes more sense and looks IMO more clean.

* Update flag name to be in `exporter` namespace.
* Update README.
@SuperQ
Copy link
Member Author

SuperQ commented Jan 13, 2018

@arvenil Ok, I had to move the log_slow_filter flag into the exporter code. This makes more sense to me anyway. 😄

README.md Outdated
@@ -76,7 +76,8 @@ Name | Description
-------------------------------------------|--------------------------------------------------------------------------------------------------
config.my-cnf | Path to .my.cnf file to read MySQL credentials from. (default: `~/.my.cnf`)
log.level | Logging verbosity (default: info)
log_slow_filter | Add a log_slow_filter to avoid exessive MySQL slow logging. NOTE: Not supported by Oracle MySQL.
exporter.lock_wait_timeout | Set a lock_wait_timeout on the connection to avoid long metadata locking. (default: 2 seconds)
exporter.log_slow_filter | Add a log_slow_filter to avoid exessive MySQL slow logging. NOTE: Not supported by Oracle MySQL.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a bonus question, what's the purpose of this flag in the exporter? To overwrite global log_slow_filter or to avoid query logging of exporter own queries?

This was a bit unclear to me from above description but after I found #60 the sentence "to avoid slow query logging of scrapes" makes it more clear.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a session flag to avoid the exporter logging its own queries. Yes, I think your description of the flag is better.

@SuperQ
Copy link
Member Author

SuperQ commented Jan 22, 2018

@arvenil Let me know if there's any other issues.

@SuperQ SuperQ merged commit 0b7dda1 into master Jan 30, 2018
@SuperQ SuperQ deleted the superq/connect_params branch January 30, 2018 13:33
@SuperQ SuperQ mentioned this pull request Jan 30, 2018
arvenil added a commit to percona/mysqld_exporter that referenced this pull request Jan 31, 2018
SuperQ pushed a commit that referenced this pull request Jan 31, 2018
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]>
ezraroi added a commit to ezraroi/mysqld_exporter that referenced this pull request Apr 17, 2018
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.

Fix lock_wait_timeout after prometheus#259 (prometheus#263)

Broken landing page, doesn't include metric path. (prometheus#264)

* Broken landing page, doesn't include metric path.

* Fix landing page.

first commit

Signed-off-by: Roi Ezra <[email protected]>

fixed code review

Signed-off-by: Roi Ezra <[email protected]>

fixed code review

Signed-off-by: Roi Ezra <[email protected]>

first commit

Signed-off-by: Roi Ezra <[email protected]>

fixed code review

fixed code review
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.

2 participants