Skip to content

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.

}

@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