Skip to content
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

[alerting] change eventLog schema to use dynamic false #61633

Merged
merged 1 commit into from
Mar 27, 2020

Conversation

pmuellr
Copy link
Member

@pmuellr pmuellr commented Mar 27, 2020

resolves #58518

Changes the object properties in the eventLog mappings to use dynamic: false
instead of dynamic: strict. This provides a bit of a safety net for cases
where the mappings change during development, or potentially in production
cases. Rather than completely lose entire events and see errors in logs, we'll
silently drop properties from events.

The dynamic setting on all inner objects isn't actually needed, it's inherited from the top.

While researching the dynamic property, I remember there's also a meta
property available, which is a convenient place to drop our meta-data about
a field being an array value, for internal processing. Bonus, it can live in
the generated mappings as well.

references:

@pmuellr pmuellr added Feature:Alerting v8.0.0 release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v7.8 labels Mar 27, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-alerting-services (Team:Alerting Services)

resolves elastic#58518

Changes the object properties in the eventLog mappings to use `dynamic: false`
instead of `dynamic: strict`.  This provides a bit of a safety net for cases
where the mappings change during development, or potentially in production
cases.  Rather than completely lose entire events and see errors in logs, we'll
silently drop properties from events.

While researching the `dynamic` property, I remember there's also a `meta`
property available, which is a convenient place to drop our meta-data about
a field being an array value, for internal processing.  Bonus, it can live in
the generated mappings as well.

references:

- https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-field-meta.html
- https://www.elastic.co/guide/en/elasticsearch/reference/current/dynamic.html
@pmuellr pmuellr force-pushed the eventLog/dynamic-false branch from 90094a2 to 81f33b7 Compare March 27, 2020 14:43
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@pmuellr pmuellr marked this pull request as ready for review March 27, 2020 18:30
@pmuellr pmuellr requested a review from a team as a code owner March 27, 2020 18:30
@mikecote mikecote added v7.8.0 and removed v7.8 labels Mar 27, 2020
Copy link
Contributor

@mikecote mikecote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@YulNaumenko YulNaumenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pmuellr pmuellr merged commit 8d539aa into elastic:master Mar 27, 2020
pmuellr added a commit to pmuellr/kibana that referenced this pull request Mar 27, 2020
resolves elastic#58518

Changes the object properties in the eventLog mappings to use `dynamic: false`
instead of `dynamic: strict`.  This provides a bit of a safety net for cases
where the mappings change during development, or potentially in production
cases.  Rather than completely lose entire events and see errors in logs, we'll
silently drop properties from events.

While researching the `dynamic` property, I remember there's also a `meta`
property available, which is a convenient place to drop our meta-data about
a field being an array value, for internal processing.  Bonus, it can live in
the generated mappings as well.

references:

- https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-field-meta.html
- https://www.elastic.co/guide/en/elasticsearch/reference/current/dynamic.html
pmuellr added a commit that referenced this pull request Mar 30, 2020
resolves #58518

Changes the object properties in the eventLog mappings to use `dynamic: false`
instead of `dynamic: strict`.  This provides a bit of a safety net for cases
where the mappings change during development, or potentially in production
cases.  Rather than completely lose entire events and see errors in logs, we'll
silently drop properties from events.

While researching the `dynamic` property, I remember there's also a `meta`
property available, which is a convenient place to drop our meta-data about
a field being an array value, for internal processing.  Bonus, it can live in
the generated mappings as well.

references:

- https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-field-meta.html
- https://www.elastic.co/guide/en/elasticsearch/reference/current/dynamic.html

Co-authored-by: Elastic Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported Feature:Alerting release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v7.8.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle event log mappings changing within the same release
5 participants