Duration metrics not following Prometheus best practices
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 11.5k
- Forks
- 1.4k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 53
Description
## Bug Report
I was browsing the documentation on [Proxy Metrics](https://linkerd.io/2/reference/proxy-metrics/#protocol-level-metrics), and noticed some of the metrics don't follow [Prometheus naming best practices](https://prometheus.io/docs/practices/naming/). In particular this concerns the metrics regarding durations.
### What is the issue?
1) Typically durations are described with the word `duration` within the metric name. (this one might just be personal taste, but it's the most frequently used and encouraged one one)
2) The metrics are not in base unit (seconds) but they are in milliseconds. This makes is difficult to work with various other component's metrics values as you need to convert to base unit.
### Possible solution
Rename metrics to use `duration` instead of `latency` and use base units.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Proxy Metrics documentation, especially the protocol-level metrics section, and identify every duration metric currently using latency or milliseconds. Trace those metric definitions and their tests or consumers before deciding the complete rename and unit migration; done means the documented duration metrics use base units and follow the stated Prometheus naming guidance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- prometheus
- Domain
- observability
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100