Skip to content

Conversation

@sbueringer
Copy link
Member

@sbueringer sbueringer commented Mar 14, 2025

Part of #2374

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 14, 2025
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 14, 2025
@k8s-ci-robot k8s-ci-robot requested a review from JoelSpeed March 14, 2025 06:07
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 14, 2025
@sbueringer sbueringer mentioned this pull request Mar 14, 2025
22 tasks
@sbueringer
Copy link
Member Author

/assign @alvaroaleman
for an initial review

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 14, 2025
Copy link
Member

@alvaroaleman alvaroaleman left a comment

Choose a reason for hiding this comment

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

Looks good but one comment re double registration


depthWithPriority = prometheus.NewGaugeVec(prometheus.GaugeOpts{
Subsystem: WorkQueueSubsystem,
Name: DepthKey,
Copy link
Member

Choose a reason for hiding this comment

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

Are you sure that prometheus allows to register the same metric twice in general and in particular with different labels?

Copy link
Member Author

Choose a reason for hiding this comment

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

Very good point. This only "worked" because I forgot to register the new metric

Copy link
Member Author

@sbueringer sbueringer Mar 16, 2025

Choose a reason for hiding this comment

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

Now I'm only using one metric. The result is the following

Metrics endpoint

# controller with enabled PQ:
workqueue_depth{controller="cluster",name="cluster",priority="0"} 0
# controller with disabled PQ:
workqueue_depth{controller="machine",name="machine",priority=""} 0

Prometheus

image

Labels with an empty label value are considered equivalent to labels that do not exist.
https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels

OpenMetrics

Empty label values SHOULD be treated as if the label was not present.
https://github.com/prometheus/OpenMetrics/blob/main/specification/OpenMetrics.md#label

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 16, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 11dae92c12c13005b9969a10867bd6ac5d763a5a

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alvaroaleman, sbueringer

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [alvaroaleman,sbueringer]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sbueringer
Copy link
Member Author

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 17, 2025
@k8s-ci-robot k8s-ci-robot merged commit 4730cab into kubernetes-sigs:main Mar 17, 2025
9 checks passed
@sbueringer sbueringer deleted the pr-pq-metrics branch March 17, 2025 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants