-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
out_loki: Allow specifiling possibly empty record accessor for labels #3269
Comments
Why not use a condition to check if it is empty on the |
It is not needed because BTW, the snippet is my entire workflow, but not minimal for the request. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
This is not my blocker, but a feature request. Noone has an interest in this, close is ok. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
This issue was closed because it has been stalled for 5 days with no activity. |
I am interested in this too. And also this warning message creates a big amount of logs from Fluentbit and it causes ingestion overload. Please, reopen this issue. |
unstale |
Fixed in #8680 |
Is your feature request related to a problem? Please describe.
I use fluentbit with loki output plugin, and configure labels with
$app
like as:But some applications use neither
app.kubernetes.io/name
norapp
label, so the record accessor$app
may be empty.In this case, fluentbit dumps logs like
[ warn] [output:loki:loki.0] empty record accessor key translation for pattern: $app
many times.I already know that
$app
is possibly empty, so the warning is undesirable.Describe the solution you'd like
I want to specify possibly empty records accessor for labels like below.
The notation
?
means the field is possibly empty.Describe alternatives you've considered
It is not desirable because I would miss some warnings.
It can split logs between having
$app
and not having one by rewrite tag filter, and then use dedicated output sections for each log.I think this is hard to maintain.
Loki plugin has
auto_kubernetes_labels
, it appends stream labels under$kubernetes[labels]
to loki labels.I embed
$app
label into$kubernetes[labels]
by modify and nest filters, and setauto_kubernetes_labels
to true,the
$app
label is used as loki label.I do not want to use all labels from kubernetes for loki labels, so this solution is not perfect.
Additional context
The text was updated successfully, but these errors were encountered: