PMM-12832 Add exporter connection timeout to DSN/config based exporters.#5275
PMM-12832 Add exporter connection timeout to DSN/config based exporters.#5275JiriCtvrtka wants to merge 19 commits intov3from
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## v3 #5275 +/- ##
==========================================
+ Coverage 42.10% 42.97% +0.86%
==========================================
Files 410 412 +2
Lines 41992 42073 +81
==========================================
+ Hits 17682 18082 +400
+ Misses 22526 22148 -378
- Partials 1784 1843 +59
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
|
||
| if cmd.LogLevelFatalFlags.LogLevel != "" { | ||
| res = append(res, fmt.Sprintf("--log-level=%s", cmd.LogLevelFatalFlags.LogLevel)) | ||
| if cmd.LogLevel != "" { |
There was a problem hiding this comment.
Linter issue from original PR, there and in admin commands.
| int32 max_postgresql_exporter_connections = 33; | ||
| // Connection timeout for exporter (if set). | ||
| google.protobuf.Duration connection_timeout = 35 [(validate.rules).duration = { |
There was a problem hiding this comment.
34 is not missed, it is above.
| func DurationString(value *time.Duration) string { | ||
| if value == nil { | ||
| return "" | ||
| } | ||
|
|
||
| return strconv.FormatFloat(value.Seconds(), 'f', -1, 64) + "s" | ||
| } |
|
Latest comments from Max on original PR are applied: #5134 (comment) and #5134 (comment) |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ca21749. Configure here.

PMM-12832
FB: Percona-Lab/pmm-submodules#4310
New separated PR for connection timeouts for exporters based on DSN/config.
Support connection timeout configuration for DB-backed exporters where the timeout is applied to DSN generation or exporter DB connection config. This includes MySQL, MongoDB, PostgreSQL, ProxySQL, Valkey, and service flows that propagate the timeout to MySQL/PostgreSQL exporters behind RDS and Azure database monitoring.
Note
Medium Risk
Adds a new
connection_timeoutfield to inventory protobuf APIs and wires it through multiple add/change CLI flows, so mismatched server/client versions or incorrect duration formatting could break exporter provisioning.Overview
Adds a new optional
connection_timeoutsetting for DB-backed exporters (MySQL, MongoDB, PostgreSQL, ProxySQL, Valkey) and threads it through thepmm-adminadd/change agent/service commands.Introduces a shared
DurationStringhelper (with tests) to serialize Gotime.Durationflags into the API-friendly seconds format, and updates generated inventory protobufs/validators to include and validate the newconnection_timeoutduration field.Reviewed by Cursor Bugbot for commit 7b1d33f. Bugbot is set up for automated code reviews on this repo. Configure here.