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: add metrics; fix latency check; latency time in sec #45

Merged
merged 11 commits into from
Dec 18, 2023

Conversation

y-eight
Copy link
Member

@y-eight y-eight commented Dec 15, 2023

Motivation

Implements #32 and fixes the latency tests.

Checks can register Prometheus collectors at sparrow lvl. Therefore a new Interface func has been added to the Checks interface.

The latency time has been changed from Microseconds to Seconds. The default & best practice for promethus is seconds. This will affect the API as well.

Changes

For additional information look at the commits.

@y-eight y-eight added feature Introduces a new feature request/internal Indicates an internal feature request area/checks Issues/PRs related to Checks labels Dec 15, 2023
@y-eight y-eight self-assigned this Dec 15, 2023
@y-eight
Copy link
Member Author

y-eight commented Dec 15, 2023

rdy for review

@y-eight
Copy link
Member Author

y-eight commented Dec 15, 2023

@ALL should we separate the checks in dedicated packages e.g. checks/health, checks/latency? checks files are getting bigger, we could outsource e.g the metrics part in a separate file.

@lvlcn-t
Copy link
Collaborator

lvlcn-t commented Dec 15, 2023

should we separate the checks in dedicated packages e.g. checks/health, checks/latency? checks files are getting bigger, we could outsource e.g the metrics part in a separate file.

@y-eight You're right, checks are getting heavy. Breaking it down into checks/health and checks/latency sounds like a good plan to keep things simple.


Additionally thanks for fixing the rest of the latency times that were incorrect.

Copy link
Collaborator

@puffitos puffitos left a comment

Choose a reason for hiding this comment

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

I've pushed some commits regarding doc grammar and I've changed a docstring. I only have some questions and concerns regarding concurrency in some functions.

Otherwise than that, everything seems OK.

pkg/checks/health.go Show resolved Hide resolved
pkg/checks/latency.go Outdated Show resolved Hide resolved
pkg/sparrow/metrics.go Show resolved Hide resolved
pkg/sparrow/run.go Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
pkg/checks/health.go Show resolved Hide resolved
@y-eight y-eight merged commit ad4ab11 into main Dec 18, 2023
6 checks passed
@lvlcn-t lvlcn-t deleted the feat/prom-metrics branch December 21, 2023 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/checks Issues/PRs related to Checks feature Introduces a new feature request/internal Indicates an internal feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants