Skip to content
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

metrics,endpointmanager: Register endpointmanager metrics via dependency #26078

Conversation

dylandreimerink
Copy link
Member

The endpointmanager was the last package to use the MustRegister package scope function in metrics. This PR replaces the access via global function by providing the registry via dependency injection. This allows us to get rid of the metrics.MustRegister function.

Register endpointmanager metrics via dependency injected registry

@dylandreimerink dylandreimerink added the release-note/misc This PR makes changes that have no direct user impact. label Jun 9, 2023
@dylandreimerink dylandreimerink force-pushed the feature/metrics-remove-must-register branch from 2e35484 to 50c519d Compare June 12, 2023 08:42
@dylandreimerink
Copy link
Member Author

/test

@dylandreimerink
Copy link
Member Author

/test-1.25-4.19

@dylandreimerink
Copy link
Member Author

/test-1.26-net-next

@dylandreimerink dylandreimerink marked this pull request as ready for review June 13, 2023 13:52
@dylandreimerink dylandreimerink requested review from a team as code owners June 13, 2023 13:52
Copy link
Member

@pippolo84 pippolo84 left a comment

Choose a reason for hiding this comment

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

Thanks, looks good overall, I've just a question about the EndpointManager interface.

pkg/endpointmanager/cell.go Outdated Show resolved Hide resolved
@dylandreimerink dylandreimerink force-pushed the feature/metrics-remove-must-register branch from 50c519d to 714f780 Compare June 14, 2023 12:35
@dylandreimerink dylandreimerink added the dont-merge/wait-until-release Freeze window for current release is blocking non-bugfix PRs label Jun 16, 2023
@joestringer joestringer removed the dont-merge/wait-until-release Freeze window for current release is blocking non-bugfix PRs label Jul 5, 2023
The endpointmanager was the last package to use the MustRegister
package scope function in metrics. This commit replaces the access
via global function by providing the registry via dependency injection.
This allows us to get rid of the metrics.MustRegister function.

Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
@dylandreimerink dylandreimerink force-pushed the feature/metrics-remove-must-register branch from 714f780 to f5a17b8 Compare July 10, 2023 11:24
@dylandreimerink
Copy link
Member Author

/test

Copy link
Member

@pippolo84 pippolo84 left a comment

Choose a reason for hiding this comment

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

💯

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Jul 10, 2023
@julianwiedmann julianwiedmann merged commit 04f6545 into cilium:main Jul 10, 2023
65 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants