Skip to content

add kcp operator custom metrics#121

Merged
kcp-ci-bot merged 1 commit intokcp-dev:mainfrom
olamilekan000:add-custom-kcp-operator-metrics
Jan 2, 2026
Merged

add kcp operator custom metrics#121
kcp-ci-bot merged 1 commit intokcp-dev:mainfrom
olamilekan000:add-custom-kcp-operator-metrics

Conversation

@olamilekan000
Copy link
Contributor

@olamilekan000 olamilekan000 commented Oct 24, 2025

Summary

Change adds custom kcp operator metrics to Prometheus
Screenshot 2025-10-24 at 06 48 57

What Type of PR Is This?

/kind feature

Related Issue(s)

Fixes 25

Release Notes


Added custom kcp-operator metrics to prometheus

@kcp-ci-bot kcp-ci-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has signed the DCO. do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 24, 2025
@olamilekan000 olamilekan000 requested review from embik and mjudeikis and removed request for mjudeikis October 24, 2025 05:49
@olamilekan000 olamilekan000 force-pushed the add-custom-kcp-operator-metrics branch from 62caaa4 to a282340 Compare October 24, 2025 05:54
Copy link
Contributor

@mjudeikis mjudeikis left a comment

Choose a reason for hiding this comment

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

@embik @xrstf your take here would be appreciated


func (mc *MetricsCollector) updateRootShardCounts(ctx context.Context) {
var rootShards operatorv1alpha1.RootShardList
if err := mc.client.List(ctx, &rootShards); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use cache (all below too) here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We might not get the actual metric values if they're cached, and besides, I think the Controller-runtime already implements caching by default

@olamilekan000 olamilekan000 force-pushed the add-custom-kcp-operator-metrics branch 6 times, most recently from 9886ccb to 8c170fc Compare October 28, 2025 21:55
@olamilekan000 olamilekan000 force-pushed the add-custom-kcp-operator-metrics branch from 8c170fc to d5ce156 Compare October 29, 2025 09:37
@olamilekan000
Copy link
Contributor Author

/retest

Copy link
Contributor

@mjudeikis mjudeikis left a comment

Choose a reason for hiding this comment

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

still same few comments

Signed-off-by: olalekan odukoya <odukoyaonline@gmail.com>
@olamilekan000 olamilekan000 force-pushed the add-custom-kcp-operator-metrics branch from d5ce156 to 903116d Compare November 5, 2025 22:11
Copy link
Contributor

@mjudeikis mjudeikis left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@kcp-ci-bot kcp-ci-bot added the lgtm Indicates that a PR is ready to be merged. label Dec 22, 2025
@kcp-ci-bot
Copy link
Contributor

LGTM label has been added.

DetailsGit tree hash: 4f4f8f3cadadc93aa319dc98460174b8956b740e

@kcp-ci-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mjudeikis

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

The pull request process is described here

Details Needs approval from an approver in each of these files:

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

@kcp-ci-bot kcp-ci-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 22, 2025
@mjudeikis mjudeikis added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 2, 2026
@kcp-ci-bot kcp-ci-bot removed the do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. label Jan 2, 2026
@olamilekan000
Copy link
Contributor Author

/retest

@kcp-ci-bot kcp-ci-bot merged commit 832e76f into kcp-dev:main Jan 2, 2026
11 of 12 checks passed
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. dco-signoff: yes Indicates the PR's author has signed the DCO. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

feature: provide metrics

4 participants