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

GH-2177 Extend prometheus with new metrics #2177

Merged
merged 5 commits into from
Jul 27, 2024

Conversation

solonovamax
Copy link
Contributor

Reworks the prometheus metrics plugin.

Changes:

  • Update prometheus metrics to latest version (previously was using the deprecated 0.16.0 simpleclient, updated to version 1.3.1)
  • Expose additional jetty metrics
  • Expose additional queued thread pool metrics
  • Expose additional reposilite-exclusive metrics (summary of response file sizes, failures, uptime, resolved files, deployed files)

- Update prometheus metrics to latest version
- Expose additional jetty metrics
- Expose additional queued thread pool metrics
- Expose additional reposilite metrics
…sponse time

Removes request uri from response time, as
> The generally accepted rough limit for a single Prometheus server is in the low millions of time series
> https://discuss.prometheus.io/t/windows-network-traffic-by-remote-ip/1626

The prometheus docs recommend keeping the cardinality of metrics low (generally under like 100-ish):
https://prometheus.io/docs/practices/instrumentation/#do-not-overuse-labels
Copy link
Owner

@dzikoysk dzikoysk left a comment

Choose a reason for hiding this comment

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

Looks good! Added some minor comments + I think it'd be nice to add at least one test to check if it even starts 😅 Here's tiny example how to bootstrap it for a plugin: https://github.com/dzikoysk/reposilite/blob/main/reposilite-plugins/migration-plugin/src/test/kotlin/com/reposilite/plugin/migration/MigrationPluginTest.kt#L12

@joshuasing
Copy link
Contributor

This looks great, thank you!

@solonovamax
Copy link
Contributor Author

@dzikoysk I've applied all suggested changes, it's ready to merge now

@dzikoysk dzikoysk changed the title Update & improve prometheus metrics GH-2177 Extend prometheus with new metrics Jul 27, 2024
@dzikoysk dzikoysk added enhancement Improvement of existing feature request plugin labels Jul 27, 2024
@dzikoysk dzikoysk merged commit 3cb49c2 into dzikoysk:main Jul 27, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement of existing feature request plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants