My experience as an LFX mentee for the Prometheus project
I’m thrilled to share my experience participating in the LFX mentorship program.
I’ve been passionate about monitoring and wanted to give back to the open source community. When I came across the LFX Mentorship program, I knew it was the perfect opportunity for me to contribute to a vital open-source initiative and grow as a developer. I learned of the LFX program during my most recent internship, and with my experience from that internship I was excited to learn more. This lead me to reach out to the maintainers of Prometheus (one of whom later became my mentor, Callum) on Slack. I wrote a cover letter, resume, and proposal for the application. While I was setting up my environment and working on understanding the Prometheus code and Remote Write system, I received a notification from LFX that I had been accepted into the mentorship program!
I’d like to share the incredible experiences I’ve had from that moment until today. I’m deeply grateful to my mentors, Callum and Jesus, as well as everyone at LFX, for making this opportunity possible.
What is the LFX Mentorship Program?
The LFX (Linux Foundation Experiences) Mentorship Program is a global open-source mentorship program offered by the Linux Foundation. This program allows mentees to work on real-world open-source projects under the direct guidance of experienced mentors, who are often maintainers of those projects. By receiving code reviews and advice from mentors, mentees can acquire practical skills and grow as members of the open-source community. You can choose from a wide range of open-source projects, including the Linux kernel, RISC-V, and CNCF projects, to find one that aligns with your interests and skills.
For accurate information, please refer to the official documentation. https://docs.linuxfoundation.org/lfx/mentorship
You can also ask questions in the #mentoring channel on the CNCF Slack.
Project
Prometheus has a feature called “Remote Write” that allows the metrics it collects to be sent to other time series databases. In Remote Write 2.0, the implementation and wire format are planned to be significantly changed to improve the efficiency of transmission. However, at present, Prometheus’ benchmarking tool, Prombench, does not yet support benchmarking for this new feature. My task is to extend this tool to support the new feature.
There are several tools for Prometheus development, but for this mentorship, I worked on Prombench and Avalanche, which are part of the test-infra repository. Avalanche provides a text-based Prometheus metrics endpoint for load testing Prometheus. Prombench automates Prometheus’ E2E testing and benchmarking, and can run benchmark tests via commands in Prometheus pull requests (PRs). Additionally, I’ve been working on a new receiver tool which will allow testing of remote write when certain receiver side issues are present, such as high latency or rate limit responses.
I added several new modes to Avalanche for generating metrics, such as spiking and dynamically increasing or decreasing them.
Additionally, Avalanche was previously only run locally, but my goal was to integrate it into Prombench so that benchmark tests could also be run in remote environments. This change makes benchmarking Prometheus’ new feature, Remote Write 2.0, simpler and more effective, bringing benefits to the entire open-source community.
Through this project I learned a lot about more detailed operations of Prometheus, building with Docker Compose, networking, and better practices for writing logs, creating tests, and handling concurrency in Go. However, the challenges were not limited to coding alone. Particularly, there were significant challenges in setting up the environment and making adjustments to Kubernetes (K8s). Since I had little experience with K8s, there was much I needed to learn.
For example, to run Prombench in a local K8s environment you could use Kind, but the manifests being used were outdated, leading to various issues. During this time, with the support of another contributor, Vandit, we were able to resolve the issues and get the environment running smoothly. This was a strong reminder that collaboration among contributors is crucial for success in open-source projects.
Additionally, this was my first time working in English and participating in an international development project. It was a significant step in building both my confidence and my career in working in a global environment.
Conculusion
The LFX Mentorship Program was a game-changer for me. Contributing to Prometheus, a crucial open-source project, and acquiring new skills has been a significant boost to my career.
I was initially apprehensive about my skills and English, but my fantastic mentors Callum and Jesus, provided exceptional support and helped me feel confident. Through this experience, I not only improved my coding abilities but also discovered the joy of contributing to the OSS community and collaborating with people from around the globe.
I would like to express my sincere gratitude to my mentors, Callum and Jesus, for their invaluable guidance throughout the project.
A big thank you also goes to the Prometheus, LFX, and CNCF communities.
I intend to continue working on this project and leverage what I’ve learned to collaborate with more developers and contribute to the growth of the open-source community.