Skip to content

Conversation

sethsamuel
Copy link
Contributor

What does this PR do?

  • Migrates Postgres config to the InstanceConfg model
  • Adds and extends config validation
  • Emits an agent health event when a config is loaded

Motivation

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Add the qa/skip-qa label if the PR doesn't need to be tested during QA.
  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

Copy link

codecov bot commented Sep 15, 2025

Codecov Report

❌ Patch coverage is 86.10526% with 66 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.23%. Comparing base (a049391) to head (dae338d).
⚠️ Report is 12 commits behind head on master.

Additional details and impacted files
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@@ -284,6 +289,7 @@ files:
example: true
- name: locks_idle_in_transaction
description: Configure collection of idle in transaction lock age metrics
hidden: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why hidden?

for m in custom_metrics:
for param in required_parameters:
if param not in m:
raise ConfigurationError('Missing {} parameter in custom metric'.format(param))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we be more descriptive into which custom metric has a missing parameter

cap_mtype = mtype.upper()
if cap_mtype not in ('RATE', 'GAUGE', 'MONOTONIC'):
raise ConfigurationError(
'Collector method {} is not known. Known methods are RATE, GAUGE, MONOTONIC'.format(cap_mtype)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly here. I think it would be helpful to know which custom metric has an invalid type


m['metrics'][ref][1] = METRIC_TYPES[cap_mtype]
except Exception as e:
raise Exception('Error processing custom metric `{}`: {}'.format(m, e))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is almost what I was looking for above, but it looks like m here is the full dict of metrics? This looks wrong

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants