-
Notifications
You must be signed in to change notification settings - Fork 19
Label naming
Loki uses a lot of concepts from Prometheus. It makes sense as well to conform to its rules regarding label naming constraints. Source documentation states that:
Label names may contain ASCII letters, numbers, as well as underscores. They must match the regex
[a-zA-Z_][a-zA-Z0-9_]*
. Label names beginning with__
are reserved for internal use.
And these rules are enforced by Tjahzi. It will validate all labels. Nonconforming labels will be dropped (this fact is logged to the console). Also duplicated labels will be removed (non deterministically).
If logLevelLabel
configuration is invalid it will be ignored and no log level label will be added to the messages sent to Loki. If there is already label with same name defined in configuration (using Label
tag) that label will be dropped and logLevelLabel
will still work.
More on labels specifically in Loki.