You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Docker actually recommends labels to have a com.xxx.yyy.zzz naming which clashes with the label regex being in use in Loki/Prometheus, which makes it in turn impossible to get those labels in Loki.
To Reproduce
Steps to reproduce the behavior:
Started Loki (any)
Use Docker logging driver
Use the log opt: labels: "com.xxx.yyy.zzz" in daemon.json
Expected behavior
There should be a way to prepare for those, as they're… technically the Docker recommendation. I'd expect that relabelling can be done before validation of the labels name, which, according to the current code, is not the case.
Environment:
Infrastructure: laptop
Deployment tool: Dokku (which labels with com.dokku.app-name for example).
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had any activity in the past 30 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
stalebot
added
the
stale
A stale issue or PR that will automatically be closed.
label
Aug 29, 2020
Sorry for the late reply I was off, just to be clear, the problem is that com.xxx.yyy.zzz is not a valid label as per this prometheus label code ?
// IsValid is true iff the label name matches the pattern of LabelNameRE. This
// method, however, does not use LabelNameRE for the check but a much faster
// hardcoded implementation.
func (ln LabelName) IsValid() bool {
if len(ln) == 0 {
return false
}
for i, b := range ln {
if !((b >= 'a' && b <= 'z') || (b >= 'A' && b <= 'Z') || b == '_' || (b >= '0' && b <= '9' && i > 0)) {
return false
}
}
return true
}
And so when you want to use those . notation label it just error out to you ? In this case I'm all good for that PR.
Describe the bug
Docker actually recommends labels to have a
com.xxx.yyy.zzz
naming which clashes with the label regex being in use in Loki/Prometheus, which makes it in turn impossible to get those labels in Loki.To Reproduce
Steps to reproduce the behavior:
labels: "com.xxx.yyy.zzz"
indaemon.json
Expected behavior
There should be a way to prepare for those, as they're… technically the Docker recommendation. I'd expect that relabelling can be done before validation of the labels name, which, according to the current code, is not the case.
Environment:
com.dokku.app-name
for example).The text was updated successfully, but these errors were encountered: