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

[Change Proposal] Add support for explicitly defining dynamic_templates #171

Closed
1 of 2 tasks
axw opened this issue May 5, 2021 · 5 comments
Closed
1 of 2 tasks
Labels
Team:Integrations Label for the Integrations team

Comments

@axw
Copy link
Member

axw commented May 5, 2021

In elastic/beats#25422 we are extending fields.yml in libbeat to support explicitly defining dynamic_templates, for use with the dynamic_templates bulk request parameter introduced in Elasticsearch 7.13.0: elastic/elasticsearch#69948. The purpose of this is to support dynamically mapping complex metrics, such as histograms and summaries. Naturally we would like to support this in integration packages too.

The above mentioned Beats PR introduces a new boolean "dynamic_template" property to fields in fields.yml. If this property is true, then the field represents a dynamic template rather than a concrete field. For example:

- name: histogram_template
  type: histogram
  dynamic_template: true

This will result in an entry in the dynamic_templates section of the index template like this:

"dynamic_templates": {
  "histogram_template": {
    "mapping": {
      "type": "histogram"
    }
  }
}

Tasks:

@axw axw added the discuss Issue needs discussion label May 5, 2021
@ruflin
Copy link
Contributor

ruflin commented May 10, 2021

++ on adding support for this. @exekias Do we already have packages where this could become useful?

@exekias
Copy link
Contributor

exekias commented May 10, 2021

Yes! Thanks for opening @axw, the obvious one will be Prometheus, where we can use this to get rid of the suffixes to match types. @ChrsMark FYI.

I'm +1 to getting this as explained, as it matches what we have in Beats after elastic/beats#25422

@axw
Copy link
Member Author

axw commented Jun 16, 2021

Seems we have consensus so I've removed the discuss label, created implementation issues, and added checkboxes.

@simitt
Copy link

simitt commented Jun 16, 2021

cc @jen-huang for visibility.

@ruflin ruflin added the Team:Integrations Label for the Integrations team label Jun 16, 2021
@axw
Copy link
Member Author

axw commented Aug 24, 2021

I'm going to close this and revert the change to package-spec. It occurred to me that we an define the dynamic templates directly in the data stream manifest. See elastic/kibana#102289 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Integrations Label for the Integrations team
Projects
None yet
Development

No branches or pull requests

4 participants