Skip to content

✨ Allow a user to provide a custom metric provider for firing metrics #3213

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jonathan-innis
Copy link
Member

@jonathan-innis jonathan-innis commented May 9, 2025

Fixes #3094

This change updates controller-runtime to expose MetricProviders for all of the subsystems where we expose metrics. This allows other controllers that leverage controller-runtime to do things like forward metrics to EMF (Embedded Metrics Format on AWS) rather than exposing them through Prometheus

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 9, 2025
@k8s-ci-robot k8s-ci-robot requested a review from alvaroaleman May 9, 2025 21:16
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 9, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: jonathan-innis
Once this PR has been reviewed and has the lgtm label, please assign fillzpp for approval. For more information see the Code Review Process.

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

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

@k8s-ci-robot k8s-ci-robot requested a review from JoelSpeed May 9, 2025 21:16
@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label May 9, 2025
@jonathan-innis jonathan-innis changed the title :sparkles Allow a user to provide a custom metric provider for firing metrics ✨ Allow a user to provide a custom metric provider for firing metrics May 9, 2025
@jonathan-innis jonathan-innis force-pushed the enable-metrics-provider-global branch from 9d9a6f4 to d9a3844 Compare May 9, 2025 21:23
@jonathan-innis
Copy link
Member Author

/test all

@jonathan-innis jonathan-innis force-pushed the enable-metrics-provider-global branch 3 times, most recently from 3c12e38 to 33ac26c Compare May 10, 2025 01:34
@jonathan-innis
Copy link
Member Author

/test all

@jonathan-innis jonathan-innis force-pushed the enable-metrics-provider-global branch from 33ac26c to 9103ac4 Compare May 10, 2025 01:39
@jonathan-innis
Copy link
Member Author

/test all

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.

I think rather than introducing the complexity of making this configurable its preferred to instead add the controller-runtime metrics registry to your own, here is an example of doing it with otel: #305 (comment)

/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 May 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support custom metrics provider for controller_runtime metrics
3 participants