Skip to content

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

Merged
merged 18 commits into from
Sep 24, 2020
Merged

Conversation

Chaitanya2456
Copy link
Contributor

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.

@Chaitanya2456 Chaitanya2456 changed the title Adding support to publish metrics to Prometheus Prometheus support Sep 9, 2020
Copy link
Member

@ajatprabha ajatprabha left a 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.

@ajatprabha
Copy link
Member

I tried running your PR locally, but for some reason the metrics are blank. Similarly, no data points in Grafana as well.

Copy link
Member

@ajatprabha ajatprabha left a 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.

Copy link
Member

@ajatprabha ajatprabha left a 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.

@ajatprabha ajatprabha merged commit 6ea2f5b into gojek:master Sep 24, 2020
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.

2 participants