loki
loki copied to clipboard
Unable to disable "service_name" feature via CLI
Describe the bug
The documentation states that CLI flag -validation.discover-service-name
can be used to set which label to take "service_name" from, or to disable "service_name" label completely. Neither of these works.
To Reproduce Steps to reproduce the behavior:
- Start Loki v3.0.0 with a clean (i.e., no
discover_service_name
defined) config file and the CLI flag that should disable "service_name" feature:loki -config.file=/etc/loki/local-config.yaml -validation.discover-service-name=
- Send a log record with a label
app=my-app
- Query this record from Loki and see now it has two labels instead of one:
app=my-app, service_name=my-app
Expected behavior
CLI flag -validation.discover-service-name
can be used to set which label to take "service_name" from, or to disable "service_name" label completely.
side quest: why is this a -validation.
setting?
While a default value is provided, the setter is append-only, which would cause any user-defined values to be added at the end of the list instead of creating a new list.
@matryer that's a side affect of it being a per-tenant limit, so it's following the pattern of the other ones, ie validation.max-length-label-name
, validation.max-length-label-value
, validation.max-label-names-per-series
, etc.
we can change it though :)