-
Notifications
You must be signed in to change notification settings - Fork 54
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
[Bug] _metadata rename into Metadata #104
Comments
I've also suffered from the same behaviour. One easy workaround is to add an ingestion pipeline with a rename processor to rename the First, create a new pipeline with the rename processor:
Then, when creating your index, give it a default_pipeline, for example:
If you are using index templates, make sure to set the default pipeline on the template, not the index, or it will be lost as soon as your index rolls over:
|
Is this related to a schema change, why is it incorrect? |
@RascoApps the problem with So all the application specific bits of logging one is are doing aren't being indexed by Elastic, so you can't search or filter on them. I don't think there's a schema change that has caused this - it seems to have been the behaviour for a long time. |
I made a pull request to changed _metadata to metadata. |
Maybe it should be changed to _meta?
https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-meta-field.html
|
@RascoApps The problem with I like |
Hi, commenting here to see if it's possible to get the ball moving on this issue. I'm using the NLog ECS Layout and want to serialize key-value pairs from the MDLC as top-level fields into my log messages. Looks like I'm running into the same issue as everyone else here where the ECS Layout prepends Does anyone know a way to get around this problem? |
Are you still going to implement this? I am using the NLog component and noticed "_metadata" gets ignored in the most recent version of Elastic. I created a subclass for EcsLayout which will rename "_metadata" to "metadata" upon serialization. However, I don't want to conflict with any planned future use-case for the "metadata" node. If so, I can use just "data" that aligns with the Azure Event Grid schema for custom data. |
This has been addressed in #138 by renaming What would be most useful to folks:
Please vote on this comment with a 👍 for 1 and a ❤️ for 2. Renaming the output of a field fixes the issue, but could be a breaking change for folks that might be expecting the |
Thanks for voting! I will release a new 1.5.x version shortly, followed by a 1.6.x version |
1.5.3 has now been released to Nuget that includes the rename from Thank you for your patience! |
Hi,
currently, we play around with the usage of the schema. We have trouble with the metadata field.
Is there any reason why the Metadata field is named _metadata?
Because also Elasticsearch mentioned here: "Field names beginning with _ are not supported"
There is another feature request to allow structured data on the root level. This would also be a solution. But we need a way to extend the logging with our own fields for business requirements. The schema does not fit here for all cases (e.g. we want to have all headers of the request logged)
The text was updated successfully, but these errors were encountered: