Skip to content

Add a note about following naming conventions in OCP#82

Merged
simonpasquier merged 1 commit intorhobs:mainfrom
jan--f:note-naming-convention
Sep 1, 2025
Merged

Add a note about following naming conventions in OCP#82
simonpasquier merged 1 commit intorhobs:mainfrom
jan--f:note-naming-convention

Conversation

@jan--f
Copy link
Contributor

@jan--f jan--f commented Aug 27, 2025

No description provided.

@jan--f jan--f requested a review from simonpasquier August 27, 2025 13:52
@jan--f jan--f force-pushed the note-naming-convention branch from 8cd3134 to e5f1e1b Compare August 27, 2025 14:35
Adding metrics for any operation should be part of the code review process like any other factor that is kept in mind for production ready code.

To learn more about when to use which metric type, how to name metrics and how to choose labels, read the following documentation:
To learn more about when to use which metric type, how to name metrics and how to choose labels, read the following documentation. OpenShift follows the outlined conventions whenever possible. Any exceptions should be reviewed and properly motivated.
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe move it after the bullet points and put the sentence into a big warning box?

we could also mention in https://rhobs-handbook.netlify.app/products/openshiftmonitoring/telemetry.md/#configure-recording-rules that recording rule names should follow the cluster:metric:operations pattern and link to https://prometheus.io/docs/practices/rules/. WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

maybe move it after the bullet points and put the sentence into a big warning box?

Hmm which syntax do we use for a waring box?

I added it before intentionally since I fear its easier to ignore after the list.

Copy link
Contributor

Choose a reason for hiding this comment

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

our doc theme supports alert boxes. I'm trying it here: https://www.docsy.dev/docs/adding-content/shortcodes/#alert

@jan--f jan--f force-pushed the note-naming-convention branch 2 times, most recently from 9b77e1b to fa30fbb Compare August 28, 2025 14:10

Your `PrometheusRule` object(s) should be created by your operator with your `ServiceMonitor` and/or `PodMonitor` objects.

Recording rule names should follow the [`level:metric:operations` pattern](https://prometheus.io/docs/practices/rules/).
Copy link
Contributor

Choose a reason for hiding this comment

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

since we add the comment today :)

Suggested change
Recording rule names should follow the [`level:metric:operations` pattern](https://prometheus.io/docs/practices/rules/).
Recording rule names should follow the [`level:metric:operations` pattern](https://prometheus.io/docs/practices/rules/). When counting items, prefer the `:count` suffix over the `:total` suffix (the latter is used to signal an accumulating counter, for example a total count of requests).

Adding metrics for any operation should be part of the code review process like any other factor that is kept in mind for production ready code.

To learn more about when to use which metric type, how to name metrics and how to choose labels, read the following documentation:
To learn more about when to use which metric type, how to name metrics and how to choose labels, read the following documentation. OpenShift follows the outlined conventions whenever possible. Any exceptions should be reviewed and properly motivated.
Copy link
Contributor

Choose a reason for hiding this comment

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

our doc theme supports alert boxes. I'm trying it here: https://www.docsy.dev/docs/adding-content/shortcodes/#alert

Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
@jan--f jan--f force-pushed the note-naming-convention branch from fa30fbb to fac75e1 Compare September 1, 2025 08:09
@simonpasquier simonpasquier merged commit eb34ce8 into rhobs:main Sep 1, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants