generated from crossplane/provider-template
-
Notifications
You must be signed in to change notification settings - Fork 95
Open
Description
Summary
Add Prometheus state metrics for all managed resource types, following the Crossplane observability guide.
Motivation
Currently, provider-sql does not expose state metrics for managed resources. These metrics are valuable for:
- Monitoring the health and status of managed resources at scale
- Alerting on resources that are not ready or synced
- Dashboarding resource counts by type and state
Proposed Solution
Implement the following metrics using crossplane-runtime/v2/pkg/statemetrics:
crossplane_managed_resource_exists- Count of existing managed resourcescrossplane_managed_resource_ready- Count of ready managed resourcescrossplane_managed_resource_synced- Count of synced managed resources
Each metric will be labeled with the GVK (GroupVersionKind) of the resource type.
Implementation Notes
- Register
MRStateRecorderfor all 22 managed resource types (PostgreSQL, MySQL, MSSQL - both cluster and namespaced) - Poll interval: 30 seconds
- Add unit tests for the configuration
Related
- Crossplane observability guide: https://github.com/crossplane/crossplane/blob/master/contributing/guide-observability.md
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
No status