Skip to content

Operator Observability Best Practices #6992

@coffeegoesincodecomesout

Description

The section here on recording rules:

Prometheus Recording Rules Naming 
As per [Prometheus](https://prometheus.io/docs/prometheus) documentation, [Recording rules](https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/#recording-rules) allow you to pre-compute frequently needed or computationally expensive expressions and save their result as a new set of time series.

Note: The Prometheus recording rules appear in Prometheus UI as metrics. In order to easily identify your operator recording rules, their names should usually follow the same naming guidelines as the metrics.

See [Alerts, Metrics and Recording Rules Tests](https://sdk.operatorframework.io/docs/best-practices/observability-best-practices/#alerts-metrics-and-recording-rules-tests) section for recording rules testing recommendations.

states that recording rules should follow the same naming guidelines as the metrics.
Recording rule should be named in the format level:metric:operations

as per the prometheus documentation found here - https://prometheus.io/docs/practices/rules/
This is so that a recording rule can be identified as such - telling the consumer that they need to understand the underlying query behind the recording rule in order to truly understand what the metrics is providing

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions