-
Notifications
You must be signed in to change notification settings - Fork 41
Prometheus support #56
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the contribution @Chaitanya2456!
The initial work looks good, I have added some comments.
One thing to keep in mind, Darkroom is now moving towards an optional cluster deployment approach, so we need to add a node
label as well.
For example:
image_crop_duration_bucket{node="Darkroom@172.25.0.3",image_ext="png",le="0.005"} 0
Update: I noticed instance
is already there.
I have not yet tested this locally, but it'd be great if you can also add a Grafana Dashboard spec later.
…cal for testing and added gcc support for Docker
…ns in manipulator and errors in ImageHandler
…outes, so removed 'AddMetricsEndPoint()'
52a2b3b
to
d69d6eb
Compare
…due to duplicate registration, moved it to dependencies
…r_errors with additional labels
I tried running your PR locally, but for some reason the metrics are blank. Similarly, no data points in Grafana as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add Statsd implementation of MetricsService as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some comments, also do a gofmt
on the code.
The application itself now exposes metrics at "/metrics" endpoint. All types of duration metrics and storage, processor errors are tracked. For durations, histogram vectors are used and counters for storage/processor errors. The prometheus service is configured(using prometheus.yml that has scrape configs and targets) to scrape the metrics exposed by the application.
In the docker-compose.yml, prometheus service is included along with darkroom so that they can be deployed at once.