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

[FLINK-36583] Add Slow Request Kube Client Metrics #908

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

morhidi
Copy link
Contributor

@morhidi morhidi commented Oct 30, 2024

What is the purpose of the change

Adding a simple counter to monitor slow API requests, identifying those that exceed a predefined time threshold, e.g.:

kubernetes.client.metrics.slow.request.threshold=5s

Verifying this change

  • Unit tests where added
  • Manually can be verified by reducing the threshold to a very low number, e.g.:
kubernetes.client.metrics.slow.request.threshold=1 MILLISECOND
-- Counters ---------------------------------------------------------------------
flink-kubernetes-operator-b48954fcf-w8p4z.k8soperator.default.flink-kubernetes-operator.system.KubeClient.HttpRequest.Slow.Count: 87

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): no
  • The public API, i.e., is any changes to the CustomResourceDescriptors: no
  • Core observer or reconciler logic that is regularly executed: no

Documentation

  • Does this pull request introduce a new feature? yes
  • If yes, how is the feature documented? docs added for the new propery

@morhidi morhidi requested review from gyfora and mxm October 30, 2024 22:23
@morhidi
Copy link
Contributor Author

morhidi commented Nov 1, 2024

cc @mxm @gyfora

Copy link
Contributor

@mxm mxm left a comment

Choose a reason for hiding this comment

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

Generally LGTM. A minor comment inline.

@@ -345,6 +345,120 @@ registry, new Configuration(), NAMESPACE, NAME, HOST),
.isEqualTo(1000L);
}

@Test
void shouldNotTrackResponseAsSlowResponseAboveThreshold() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Based on what the test does, this name seems more appropriate:

Suggested change
void shouldNotTrackResponseAsSlowResponseAboveThreshold() {
void shouldTrackResponseAsSlowResponseAboveThreshold() {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct, fixing

@morhidi morhidi merged commit 6d13876 into apache:main Nov 4, 2024
98 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