-
Notifications
You must be signed in to change notification settings - Fork 18.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
New feature gelf "raw" message processing #47915
Comments
What does this mean? Do you have an example? |
Let say my application output (on stderr) native JSON payload Currently, using the GELF driver, all this line will end up in a super structure {
"_container_id": info.ContainerID,
"_container_name": info.Name(),
"_image_id": info.ContainerImageID,
"_image_name": info.ContainerImageName,
"_command": info.Command(),
"_tag": tag,
"_created": info.ContainerCreated,
"message" : "{\"message\":\"this is something\",\"source_file\":\"/path/to/my/exe\",\"severity\":\"WHATEVER\"}"
} All metadata will be lost, and post processing will be required. With gelf-json-raw = true, gelf will receive, {
"message": "this is something",
"source_file": "/path/to/my/exe",
"severity": "WHATEVER",
"_container_id": info.ContainerID,
"_container_name": info.Name(),
"_image_id": info.ContainerImageID,
"_image_name": info.ContainerImageName,
"_command": info.Command(),
"_tag": tag,
"_created": info.ContainerCreated,
} All metadata are preserved and usable by gralog. Please note that all native driver field will take precedence on untrusted payload. |
Description
Today,the gelf driver take a line and use it as the "short" version of a message, adding all metadata in a surrounding JSON armor.
I suggest a new gelf-raw-json option to parse every incoming log line as a JSON payload, and merge all drivers metadata in it.
That will dramaticaly increase the gelf driver capability yet, in a safe design.
This is simple enough for me to implement, here is the related PR
The text was updated successfully, but these errors were encountered: