-
Notifications
You must be signed in to change notification settings - Fork 1.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
Loki Output structured_metadata from Map-like data structure #9463
Comments
7 tasks
Hi all, I have created a PR to address this, but as I mentioned in the
I am happy to add more to this, once I get some feedback. |
I created a PR for the docs here fluent/fluent-bit-docs#1527 |
7 tasks
I creates a PR to backport this to 3.2.x #10012 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
We want to use the Loki
structure_metadata
feature to store data alongside a given log message. This is currently possible with theloki
output, but we need to explicitly define key/value pairs. This obviously requires us to know all key names ahead of runtime, so they can be defined in the config.However. in our use case, we want to be able to handle arbitrary keys detected at runtime.
Describe the solution you'd like
We are open minded about how to solve this, but the most obvious idea would be to be able to configure the
loki
output with a Map-like data structure.Imagine we input data like this
"__attributes": {"test_1": "hello", "test_2": "World!"}
We can already configure the 'loki' output like this:
The proposal is to be able to do the following, to acheive the same result with this input data described above:
...and indeed, if more keys were present in the
attributes
object, then they would also be added.Describe alternatives you've considered
I wondered if it was possible to extend the Record Accessor syntax to have some kind of "varargs".
For example, if we could do the following to say the argument should be used as a set of keys (note trailing
...
on$attributes
)Additional context
Within our organisation, we are an infrastructure team providing logging systems to application teams. Application teams are simply expected to output logs as JSON to the console.
We want to support as many logging use cases as possible, and essentially want application teams to be able to determine what keys go into structured metadata themselves, without us having to hard code every possibility into the fluent-bit config
The text was updated successfully, but these errors were encountered: