Metric Naming Conventions
Establish consistent metric naming conventions that make your observability data discoverable and meaningful. Covers Prometheus conventions, OpenTelemetry semantic conventions, and organizational best practices.
Usage
Ask about naming metrics for your services, choosing labels, or establishing naming standards for your organization.
Examples
- "What naming convention should I use for my Prometheus metrics?"
- "How do I name custom metrics in OpenTelemetry?"
- "What labels should I add to my HTTP request metrics?"
Guidelines
- Use snake_case with a namespace prefix for all metric names
- Include the unit in the metric name suffix (e.g., _seconds, _bytes, _total)
- Keep label cardinality low to avoid metric explosion
- Follow OpenTelemetry semantic conventions for common metric types
- Document your naming conventions and enforce them in code review