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