Which of the following is a valid metric name?
According to Prometheus naming rules, metric names must match the regex [a-zA-Z_:][a-zA-Z0-9_:]*. This means metric names must begin with a letter, underscore, or colon, and can only contain letters, digits, and underscores thereafter.
The valid metric name among the options is go_goroutines, which follows all these rules. It starts with a letter (g), uses underscores to separate words, and contains only allowed characters.
By contrast:
go routines is invalid because it contains a space.
go.goroutines is invalid because it contains a dot (.), which is reserved for recording rule naming hierarchies, not metric identifiers.
99_goroutines is invalid because metric names cannot start with a number.
Following these conventions ensures compatibility with PromQL syntax and Prometheus' internal data model.
Extracted from Prometheus documentation -- Metric Naming Conventions and Data Model Rules sections.
Lashawnda
3 months agoAmmie
3 months agoShaun
3 months agoLacey
3 months agoTanja
4 months agoDavida
4 months agoJulio
4 months agoRosina
4 months agoMyra
4 months agoYolande
5 months agoTambra
5 months agoVerlene
5 months agoMona
6 months agoEdelmira
6 months agoPhuong
6 months agoMonte
6 months agoWillie
6 months agoRikki
6 months agoLeonora
7 months agoCarlee
7 months agoEstrella
7 months agoCathern
7 months agoTaryn
7 months agoAlline
1 month agoHelaine
1 month agoLashawna
3 months ago