Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add basic prometheus metrics #624

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

Open
Thor77 wants to merge 2 commits into adnanh:master
base: master
Choose a base branch
Loading
from Thor77:prometheus-metrics

Conversation

@Thor77
Copy link

@Thor77 Thor77 commented Feb 18, 2023
edited
Loading

This is a quick draft for adding some basic Prometheus metrics at /metrics if the -metrics flag is passed.

If you're open to adding metrics in general I would add some more metrics for the remaining error conditions and hook execution time.

In case you don't like the addition of all those dependencies I could also switch the implementation to use https://github.com/VictoriaMetrics/metrics which doesn't have as many useful features but is also a lot smaller.

Current custom metrics example:

# HELP webhook_hook_errors_total Total number of hook errors
# TYPE webhook_hook_errors_total counter
webhook_hook_errors_total{error="rules",hook="deploy"} 1
# HELP webhook_hook_requests_total Total number of hook requests
# TYPE webhook_hook_requests_total counter
webhook_hook_requests_total{hook="deploy"} 3
# HELP webhook_hook_success_total Total number of successful hook executions
# TYPE webhook_hook_success_total counter
webhook_hook_success_total{hook="deploy"} 2

Solves #527

blib, imorph, DamianMaslanka5, and CediGasser reacted with thumbs up emoji xvello and imorph reacted with hooray emoji
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /