-
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
Move session params to DSN #259
Conversation
In order to avoid lost session params if the `db` object reconnects in the background, move session params to the DSN string configuration.
121694d
to
f7b639c
Compare
@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.
@arvenil Ok, I had to move the |
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. |
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.
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.
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.
It's a session flag to avoid the exporter logging its own queries. Yes, I think your description of the flag is better.
@arvenil Let me know if there's any other issues. |
# 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]>
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
In order to avoid lost session params if the
db
object reconnects inthe background, move session params to the DSN string configuration.