fix: Add target ping interval#948
fix: Add target ping interval#948destinyoooo wants to merge 2 commits intoburningalchemist:masterfrom
Conversation
|
Hey @destinyoooo, I have a small question here: 30 seconds is a hardcoded parameter. Do you think there are scenarios where it needs to be adjusted by the user? Currently, one of the options to reduce that constant pinging (which isn't good for data warehouse solutions cost-wise) is to use the flag to disable ping completely (at a cost of potential connection losses). So I'm wondering whether we need to expose pingInterval in configuration, or it's a sane default to have. What do you think? |
Hello! I've completed the modification to change pingInterval from a hardcoded 30 seconds to a configurable parameter. Here are the related improvements:
|
|
In my opinion. This improvement is very necessary because:
|
|
Yeah, makes sense to me. 👍 Let me have a brief look and we merge it soon. 👍 |
burningalchemist
left a comment
There was a problem hiding this comment.
There is a minor nitpick on the comment, otherwise looks good to me 👍
| TimeoutOffset model.Duration `yaml:"scrape_timeout_offset" env:"SCRAPE_TIMEOUT_OFFSET"` // offset to subtract from timeout in seconds | ||
| ScrapeErrorDropInterval model.Duration `yaml:"scrape_error_drop_interval" env:"SCRAPE_ERROR_DROP_INTERVAL"` // interval to drop scrape errors from the error counter, default is 0 | ||
| MaxConnLifetime time.Duration `yaml:"max_connection_lifetime" env:"MAX_CONNECTION_LIFETIME"` // maximum amount of time a connection may be reused to any one target | ||
| PingInterval model.Duration `yaml:"ping_interval" env:"PING_INTERVAL"` // interval between database pings, default is 30s |
There was a problem hiding this comment.
Please adjust the comment for the default value 🙂
This PR includes the following improvements: