Write tutorial - How are metrics exposed by gitlab-workhorse?
This is a how-to / demo style of tutorial.
Focuses on gitlab service: gitlab-workhorse
Learn how to see for yourself: What events increment that counter? What points in the code start and end this latency measurement?
- Show how to find and query the
/metrics
for this service on an example node in the GitLab.com production fleet. - Show how to find in the source code what software events trigger:
- a counter metric to increment
- a gauge metric to increment or decrement
- a histogram metric to tally an event
- a latency metric to start and end its measurement and be added to a histogram or counter
This will involve a source code dive, but keep it as simple as possible. Focus on sharing reusable methodology and gotchas (e.g. mention that metric names may be composed from substrings so that searching for substrings may yield a hit if the full name does not).
Try to rely on command-line tools or gitlab's integrated elasticsearch rather than assuming the reader has an IDE that has parsed and indexed the relevant source code repository.
Edited by Matt Smiley