-
Notifications
You must be signed in to change notification settings - Fork 94
Open
Labels
enhancementNew feature or requestNew feature or requestmetricsMetrics related issuesMetrics related issues
Description
Problem
When a metric is configured for a source but its metric definition is missing
or invalid, pgwatch currently emits limited or rate-limited warnings and skips
metric collection.
This makes it difficult for users to understand why certain metrics are not
being collected, especially in larger or dynamic configurations.
** Steps to reproduce**
- Configure a source with a metric name that does not exist in metric definitions
- Start pgwatch
- Observe that metric collection is skipped with minimal or delayed logging
Current behavior
- Warnings are rate-limited and may not appear immediately
- Log messages do not always include enough context (source + metric)
- Users must inspect configuration or code to identify the root cause
Expected behavior
- Clear and immediate warning when a configured metric has no valid definition
- Log messages should include:
- Source name
- Metric name
- Reason (missing definition, unsupported version, etc.)
Proposed improvement
Improve error reporting to:
- Emit clearer warnings when a metric definition is missing or invalid
- Include source and metric context in log messages
- Retain rate-limiting to avoid excessive log spam
** Environment**
- pgwatch version: current master
- OS: independent
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestmetricsMetrics related issuesMetrics related issues