You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would be great if there was a way to dynamically serialize key-value pairs from the MDLC as top-level fields in the event body, without placing them under the metadata field.
For example:
Using the latest version of Elastic.CommonSchema.NLog, an MDLC holding the key-value pairs "foo":"bar" and "abc":123 would be serialized into the event like this:
{
"metadata" : {
"foo": "bar",
"abc": 123
}
}
I think an option should exist to have them serialized directly at the top level of the event like this:
{
"foo": "bar",
"abc": 123
}
On issues similar to this (#104 and #141) others have already suggested using a logstash or ingest pipeline to rename the fields. I find that for larger scale multi-tenant setups, it works out much better to let each app owner get their desired fields right in their app "at the edge".
This can help by simplifying the process ("what you write is what you get"), giving developers more freedom to make changes independently, and removing the additional overhead of having to maintain one or more pipelines.
The text was updated successfully, but these errors were encountered:
See also NLog/NLog#4982 for an example of customizing your own NLog JsonLayout that outs JSON in Ecs-Common-Schema-Format. Where you are free to customize it in whatever direction you like.
Hi,
Would be great if there was a way to dynamically serialize key-value pairs from the MDLC as top-level fields in the event body, without placing them under the
metadata
field.For example:
Using the latest version of
Elastic.CommonSchema.NLog
, an MDLC holding the key-value pairs"foo":"bar"
and"abc":123
would be serialized into the event like this:I think an option should exist to have them serialized directly at the top level of the event like this:
On issues similar to this (#104 and #141) others have already suggested using a logstash or ingest pipeline to rename the fields. I find that for larger scale multi-tenant setups, it works out much better to let each app owner get their desired fields right in their app "at the edge".
This can help by simplifying the process ("what you write is what you get"), giving developers more freedom to make changes independently, and removing the additional overhead of having to maintain one or more pipelines.
The text was updated successfully, but these errors were encountered: