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

feat(metrics): histogram metric for loop latency #5812

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

Conversation

Hy3n4
Copy link

@Hy3n4 Hy3n4 commented May 20, 2024

This PR is supposed to add new histogram type of metric for the internal loop latency. This should be more useful when creating the SLIs.

Checklist

Hy3n4 added 2 commits May 20, 2024 08:38
Signed-off-by: Hy3n4 <hy3nk4@gmail.com>
Signed-off-by: Hy3n4 <hy3nk4@gmail.com>
Comment on lines +185 to +193
_, err = meter.Float64Histogram(
"keda.internal.scale.loop.latency.bucket",
api.WithDescription("Internal latency of ScaledObject/ScaledJob loop execution"),
api.WithUnit("s"),
)
if err != nil {
otLog.Error(err, msg)
}

Copy link
Member

Choose a reason for hiding this comment

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

Isn't this the same as the metric just above?

Copy link
Author

Choose a reason for hiding this comment

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

Well, yes, but unlike the above one, this should be a histogram. But I am not that sure when it comes to otel.

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.

None yet

2 participants