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
1 month agoAmmie
2 months agoShaun
2 months agoLacey
2 months agoTanja
2 months agoDavida
2 months agoJulio
3 months agoRosina
3 months agoMyra
3 months agoYolande
3 months agoTambra
3 months agoVerlene
4 months agoMona
4 months agoEdelmira
4 months agoPhuong
4 months agoMonte
5 months agoWillie
5 months agoRikki
5 months agoLeonora
5 months agoCarlee
5 months agoEstrella
5 months agoCathern
6 months agoTaryn
6 months agoLashawna
1 month ago