DEV Community

Cover image for My first contribution to prometheus
Matthew Foley
Matthew Foley

Posted on

My first contribution to prometheus

Several weeks ago I joined Virtual Coffee, and I really love that community. I shared during one of the weekly sessions that I was hoping to learn some more about backend by contributing to open source software. One of the more seasoned members suggested that I try contributing to prometheus/prometheus.

Taken from the description on the repo:

Prometheus, a Cloud Native Computing Foundation project, is a systems and service monitoring system. It collects metrics from configured targets at given intervals, evaluates rule expressions, displays the results, and can trigger alerts when specified conditions are observed.

As I started looking at the project issues, I didn't find many good first issues that I personally felt comfortable with, so I decided to take advantage that I had a completely fresh set of eyes on the project! As I followed along with the Getting Started guide, something immediately jumped out at me! When opening http://localhost:9090/metrics and opening the Metrics Explorer, I was presented with a really long list of metrics that I could view the time series data for. I thought to myself "with such a long list, it would be nice if there was a search field!" I opened an issue about this, and then a subsequent pull request. Here's a screenshot of at least the first iteration of what I implemented:

screenshot of metrics search feature

This project uses Developer Certificate of Origin (DCO) as one of the checks it does for PR. This makes sure that all commits are signed off to include the contributors name and email address. I learned the hard way about amending commits and using git commit -s to sign off commits.

Beyond that, the reviewer GitHub user @juliusv was very friendly and engaging and asked me to implement the use of Fuzzy search with @nexucis/fuzzy, which had been used on an adjacent component. I was also able to add appropriate tests for the new component!

Since this PR, I've gotten a couple more merged to the project, including some contribution to the Go codebase, so I'm starting to dig into the backend side which is what I had wanted to do!

Cover image by Timon Wanner. Picked it on account of the story of Prometheus.

Discussion (0)