You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(otel): support user-defined custom metric queries via ConfigMap references #343
Add support for user-defined custom SQL metric queries in the OTel monitoring feature, allowing users to extend the built-in metrics without requiring operator upgrades.
Motivation
The current OTel monitoring (added in #342) embeds metric queries in base_config.yaml via go:embed. Users cannot add custom SQLmetric mappings without an operator upgrade. CNPG provides this extensibility via customQueriesConfigMap / customQueriesSecret.
Where queries.yaml uses the OTel sqlquery receiver format:
queries:
- sql: "SELECT count(*) as total FROM pg_stat_activity WHERE state = 'active'"metrics:
- metric_name: documentdb.postgres.active_connectionsvalue_column: totaldata_type: gauge
Implementation Notes
The operator would merge user-provided queries into the generated ConfigMap alongside base_config.yaml
Activity