Skip to content

[-] return the error from MultiWriter.DefineMetrics(), fixes #1222#1224

Merged
pashagolub merged 2 commits intocybertec-postgresql:masterfrom
Mahmoud-Ayman-Saleh:fix-bugs
Feb 24, 2026
Merged

[-] return the error from MultiWriter.DefineMetrics(), fixes #1222#1224
pashagolub merged 2 commits intocybertec-postgresql:masterfrom
Mahmoud-Ayman-Saleh:fix-bugs

Conversation

@Mahmoud-Ayman-Saleh
Copy link
Contributor

Fix: return the accumulated error instead of nil
Add TestDefineMetrics to cover the failure scenarios:

  • single definer returning an error
  • multiple definers both returning errors
  • mixed writers where one definer fails

@pashagolub pashagolub changed the title Fix: return the accumulated error instead of nil #1222 [-] return the error from MultiWriter.DefineMetrics(), fixes #1222 Feb 22, 2026
@pashagolub pashagolub self-assigned this Feb 22, 2026
@pashagolub pashagolub added the sinks Where and how to store monitored data label Feb 22, 2026
@pashagolub pashagolub merged commit 6e60272 into cybertec-postgresql:master Feb 24, 2026
5 checks passed
Makeepan-dev pushed a commit to Makeepan-dev/pgwatch that referenced this pull request Feb 25, 2026
…ec-postgresql#1222 (cybertec-postgresql#1224)

* Fix: return the accumulated error instead of nil cybertec-postgresql#1222

* improve tests

---------

Co-authored-by: Pavlo Golub <pavlo.golub@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sinks Where and how to store monitored data

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants