Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to disable "service_name" feature via CLI #12944

Open
nehaev opened this issue May 12, 2024 · 3 comments
Open

Unable to disable "service_name" feature via CLI #12944

nehaev opened this issue May 12, 2024 · 3 comments
Labels
3.0 type/bug Somehing is not working as expected

Comments

@nehaev
Copy link
Contributor

nehaev commented May 12, 2024

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:

  1. 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=
  2. Send a log record with a label app=my-app
  3. 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.

@JStickler JStickler added 3.0 type/bug Somehing is not working as expected labels May 13, 2024
@matryer
Copy link

matryer commented May 14, 2024

side quest: why is this a -validation. setting?

@rgroothuijsen
Copy link
Contributor

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.

@trevorwhitney
Copy link
Collaborator

@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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.0 type/bug Somehing is not working as expected
Projects
None yet
Development

No branches or pull requests

5 participants