1. Prometheus Official Documentation, "Metric names and labels": This section explicitly defines the valid characters and structure for metric names. It states, "Metric names ... must match the regex [a-zA-Z][a-zA-Z0-9]." This rule directly invalidates options A, B, and D, while confirming C is valid.
Source: Prometheus Authors. (n.d.). Data model. Prometheus Documentation. Retrieved from https://prometheus.io/docs/concepts/datamodel/#metric-names-and-labels
2. Prometheus Official Documentation, "Naming best practices": This guide provides conventions for naming metrics and explicitly uses gogoroutines as an example of a standard metric from the Go client library. It reinforces that underscores should be used as separators, not other characters like dots.
Source: Prometheus Authors. (n.d.). Metric and label naming. Prometheus Documentation. Retrieved from https://prometheus.io/docs/practices/naming/#metric-names
3. OpenMetrics Specification, "Syntax": OpenMetrics, the successor to the Prometheus exposition format, formally defines the syntax for metric names. The ABNF (Augmented Backus–Naur form) for a metric name is ( ALPHA / "" ) ( ALPHA / DIGIT / "" ). This confirms that names must start with a letter or underscore and can only contain letters, digits, and underscores.
Source: OpenMetrics Authors. (2023). OpenMetrics Specification, Version 1.0.0. Section: "Overall Structure". Retrieved from https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#overall-structure