-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[exporter/loki] Make optional default labels exporter, job, instance, level #22156
Labels
Comments
mar4uk
added
enhancement
New feature or request
needs triage
New item requiring triage
labels
May 22, 2023
/label exporter/loki |
Thanks for taking care of this ! In my opinion, the hardcoded value |
Perhaps there should be an option to name it differently, but not a total rename right now. We'd need to give users notice in advance about this change. |
jpkrohling
pushed a commit
that referenced
this issue
Jul 27, 2023
) **Description:** <Describe what has changed.> Added new setting `default_labels_enabled` into the loki exporter config. When this setting is passed loki exporter will not set default labels if the setting value is false, for example: ``` loki: endpoint: ... default_labels_enabled: job: true instance: false exporter: false level: false ``` In this example, only the `job` label will be added, `instance`, `exporter`, and `level` will not be added as Loki labels. If `default_labels_enabled` is omitted the current behavior will be applied: default labels will be added (exporter, job, instance, label) If one of the labels is omitted in `default_labels_enabled` then the current behavior will be applied: this label will be added **Link to tracking Issue:** #22156 **Testing:** unit tests added **Documentation:** README updated
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Component(s)
exporter/loki
Is your feature request related to a problem? Please describe.
Currently, loki exporter sets default labels:
For the user's convenience, it would be nice to make these labels optional
Related issues/discussions:
Describe the solution you'd like
level
label by default (it is actually not a good practice to promote log level to the label in Loki)default_labels
section to the loki exporter config:Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: