-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[operator] Add support for discover_service_name configuration override in LokiStack CR #16154
Comments
This is already possible and documented in the recently updated Labels topic. "The default list of resource attributes to store as labels can be configured using default_resource_attributes_as_index_labels under the distributor’s otlp_config. You can set global limits using limits_config.otlp_config." |
@JStickler Thanks for the answer. That's interesting, I totally missed these docs. In this case we're using Vector for log shipping. So if I understand this correctly, we could achieve this with https://loki-operator.dev/docs/api.md/#loki-grafana-com-v1-OTLPSpec? I was also looking at https://grafana.com/docs/loki/latest/get-started/labels/#default-labels-for-all-users. Could I also inject Typically adding something like [sinks.output_loki.labels]
service_name = "{{kubernetes.labels.app_kubernetes_io_name}}" We were previously using [sinks.output_loki.labels]
application = "{{kubernetes.labels.app_kubernetes_io_name}}" Thanks for any feedback on this. |
Ok, so I just tried adding [sinks.output_loki.labels]
service_name = "{{kubernetes.labels.app_kubernetes_io_name}}" as a an extra label in the Vector config, and that works. Not sure how the OTLP stuff relates to this. Anyways, thanks for the feedback @JStickler. Closing |
@jasaltvik, not surprised you missed the docs, it was a recent update. Glad I could help! |
Is your feature request related to a problem? Please describe.
We are in the process of migrating from Elasticsearch to Loki in OpenShift Logging (using the Loki Operator). Initially, the discover_service_name configuration option was set by default, but it was eventually disabled as none of the labels were set to populate the service_name correctly (causing it to be set to unknown_service, which is not helpful). However, we have been overriding the application label to ensure the service_name have been detected correctly. In addition, when using Grafana 11.3 and up, the Explore Logs app is installed by default, which depends on the service name being set to be useful. We would really appreciate a way for us to enable the service name detection again so that we can create a better default log experience for the developers using Loki via Grafana.
Describe the solution you'd like
It would be nice to be able to override this via a parameter in the LokiStack CR in some way.
Describe alternatives you've considered
I'm not sure if it is possible to override this in any way when using the operator. I see that there is a CLI flag that potentially could be used. Appreciate any input on this.
Additional context
The text was updated successfully, but these errors were encountered: