Skip to content

Conversation

theTibi
Copy link
Contributor

@theTibi theTibi commented Oct 15, 2025

…r node information

  • Added retrieval of current node role and cluster status.
  • Updated metrics to include node-specific details such as role and host for each backup.
  • Improved error handling for node info and cluster status retrieval.

PMM-XXXX (optional, if ticket reported)

  • Links to related pull requests (optional).

Below we provide a basic checklist of things that would make it a good PR:

  • Make sure to sign the CLA (Contributor License Agreement).
  • Make sure all tests pass.
  • Keep current with the target branch and fix conflicts if necessary.
  • Update jira ticket description if necessary.
  • Attach screenshots and/or console output to the jira ticket to confirm new behavior, if applicable.
  • Leave notes to the reviewers if you need to focus their attention on something specific.

Once all checks pass and the code is ready for review, please add pmm-review-exporters team as the reviewer. That would assign people from the review team automatically. Report any issues on our Forum.

…r node information

- Added retrieval of current node role and cluster status.
- Updated metrics to include node-specific details such as role and host for each backup.
- Improved error handling for node info and cluster status retrieval.
@theTibi theTibi requested a review from a team as a code owner October 15, 2025 11:46
@theTibi theTibi requested review from BupycHuk and JiriCtvrtka and removed request for a team October 15, 2025 11:46
Copy link

codecov bot commented Oct 15, 2025

Codecov Report

❌ Patch coverage is 14.58333% with 41 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.09%. Comparing base (dc46ed5) to head (4b44ef2).
⚠️ Report is 144 commits behind head on main.

Files with missing lines Patch % Lines
exporter/pbm_collector.go 14.58% 39 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1181      +/-   ##
==========================================
- Coverage   70.88%   65.09%   -5.80%     
==========================================
  Files          28       29       +1     
  Lines        3569     3100     -469     
==========================================
- Hits         2530     2018     -512     
- Misses        904      941      +37     
- Partials      135      141       +6     
Flag Coverage Δ
agent 65.09% <14.58%> (-5.80%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

… retrieval

- Removed unnecessary cluster status retrieval and integrated replset iteration directly from backup metadata.
- Updated metrics to focus on node-specific details, enhancing clarity and performance.
- Improved overall structure for better maintainability.
…ved metric creation

- Added logging for the creation of metrics and labels to provide better visibility during the backup metrics collection process.
- Updated the `createPBMMetric` function to include logging of the metric name being created.
- Enhanced the iteration over backups and replsets with detailed logs for each processing step, including current node checks and metric additions.
- Improved overall structure for clarity and maintainability.
…nd improved metric creation"

This reverts commit 5642f84.
- Updated `pbmBackupsMetrics` and `pbmAgentMetrics` functions to accept `currentNode` as a parameter, reducing redundant calls to retrieve node information.
- Enhanced error handling for node info retrieval, ensuring metrics are only collected if the current node information is successfully obtained.
- Improved overall structure for clarity and maintainability.
@theTibi theTibi merged commit 64f7029 into percona:main Oct 20, 2025
14 of 16 checks passed
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