-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Description
Currently in the templates for logs-*-*, metrics-*-* etc. date detection is set to false. These templates were introduced with #57629 and the discussion around the defaults happened here. Recently the discussion popped up to potentially change this default. This issue is to have a place for this discussion and persist the decision.
Reasons to keep it disabled
One of the initial reasons to keep it disabled was that it could lead to documents fail to ingest. For example a field is detected as date but the follow up documents contain different values. This concern is become less sever as we have introduced ignore_malformed for all fields and failure store is coming along. Having date_detection on by default could also have a performance impact.
If we change the default now, we also need to discuss if some users would consider this a breaking change.
ECS mappings enough?
Another change that has happened since the initial discussion is the introduction of dynamic ECS templates. These ECS templates contain a block for matching various names to date, for example *.timestamp. Is this enough? Can we encourage users that want to have automatic matching to use one of the names here for their fields?
Overwriting the default
Today it is already possible to overwrite the default by using logs@custom. As soon as data streams roll over, the new default is applied and it will also be persisted during upgrades. If users are using an integration, logs-{your-dataset}@custom can be overwritten to make the change more local. But can we make a change even easier for example by bringing it to the UI or make it a setting per data stream instead of the template? Could we have a switch in Stack Management to toggle date detection on and off?
There is also work ongoing by the team around @flash1293 to detect wrong mappings in fields. Can we detect that a field should be a date and recommend a mapping change?