-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Fleet] fix dynamic mapping missing time_series_metric
#160417
Conversation
Pinging @elastic/fleet (Team:Fleet) |
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
@@ -206,6 +206,7 @@ function _generateMappings( | |||
case 'boolean': | |||
dynProperties = { | |||
type: field.object_type, | |||
time_series_metric: field.metric_type, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found that metric_type
can directly used here, so not needed to put time_series_metric
on the field.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM 🚀
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
) ## Summary Closes elastic#155004 Found a simplification of adding `time_series_metric` to `dynamic_templates`. I think tsdb enabled check is not needed similarly to elastic#157047 To test: - Install package by upload or local registry [istio-0.3.3.zip](https://github.com/elastic/kibana/files/11849494/istio-0.3.3.zip) - Check that the created `metrics-istio.istiod_metric`s index template includes `time_series_metric` ``` "dynamic_templates": [ { "istio.istiod.metrics.*.counter": { "path_match": "istio.istiod.metrics.*.counter", "mapping": { "time_series_metric": "counter", "type": "double" } } }, { ``` (cherry picked from commit 863f6bd)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…) (#160444) # Backport This will backport the following commits from `main` to `8.9`: - [[Fleet] fix dynamic mapping missing `time_series_metric` (#160417)](#160417) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Julia Bardi","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-06-23T17:51:12Z","message":"[Fleet] fix dynamic mapping missing `time_series_metric` (#160417)\n\n## Summary\r\n\r\nCloses https://github.com/elastic/kibana/issues/155004\r\n\r\nFound a simplification of adding `time_series_metric` to\r\n`dynamic_templates`.\r\n\r\nI think tsdb enabled check is not needed similarly to\r\nhttps://github.com//pull/157047\r\n\r\nTo test:\r\n- Install package by upload or local registry\r\n[istio-0.3.3.zip](https://github.com/elastic/kibana/files/11849494/istio-0.3.3.zip)\r\n- Check that the created `metrics-istio.istiod_metric`s index template\r\nincludes `time_series_metric`\r\n```\r\n\"dynamic_templates\": [\r\n {\r\n \"istio.istiod.metrics.*.counter\": {\r\n \"path_match\": \"istio.istiod.metrics.*.counter\",\r\n \"mapping\": {\r\n \"time_series_metric\": \"counter\",\r\n \"type\": \"double\"\r\n }\r\n }\r\n },\r\n {\r\n```","sha":"863f6bdb8bca99af02392e74ec75e37373bdcfc0","branchLabelMapping":{"^v8.10.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v8.9.0","v8.10.0"],"number":160417,"url":"https://github.com/elastic/kibana/pull/160417","mergeCommit":{"message":"[Fleet] fix dynamic mapping missing `time_series_metric` (#160417)\n\n## Summary\r\n\r\nCloses https://github.com/elastic/kibana/issues/155004\r\n\r\nFound a simplification of adding `time_series_metric` to\r\n`dynamic_templates`.\r\n\r\nI think tsdb enabled check is not needed similarly to\r\nhttps://github.com//pull/157047\r\n\r\nTo test:\r\n- Install package by upload or local registry\r\n[istio-0.3.3.zip](https://github.com/elastic/kibana/files/11849494/istio-0.3.3.zip)\r\n- Check that the created `metrics-istio.istiod_metric`s index template\r\nincludes `time_series_metric`\r\n```\r\n\"dynamic_templates\": [\r\n {\r\n \"istio.istiod.metrics.*.counter\": {\r\n \"path_match\": \"istio.istiod.metrics.*.counter\",\r\n \"mapping\": {\r\n \"time_series_metric\": \"counter\",\r\n \"type\": \"double\"\r\n }\r\n }\r\n },\r\n {\r\n```","sha":"863f6bdb8bca99af02392e74ec75e37373bdcfc0"}},"sourceBranch":"main","suggestedTargetBranches":["8.9"],"targetPullRequestStates":[{"branch":"8.9","label":"v8.9.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.10.0","labelRegex":"^v8.10.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/160417","number":160417,"mergeCommit":{"message":"[Fleet] fix dynamic mapping missing `time_series_metric` (#160417)\n\n## Summary\r\n\r\nCloses https://github.com/elastic/kibana/issues/155004\r\n\r\nFound a simplification of adding `time_series_metric` to\r\n`dynamic_templates`.\r\n\r\nI think tsdb enabled check is not needed similarly to\r\nhttps://github.com//pull/157047\r\n\r\nTo test:\r\n- Install package by upload or local registry\r\n[istio-0.3.3.zip](https://github.com/elastic/kibana/files/11849494/istio-0.3.3.zip)\r\n- Check that the created `metrics-istio.istiod_metric`s index template\r\nincludes `time_series_metric`\r\n```\r\n\"dynamic_templates\": [\r\n {\r\n \"istio.istiod.metrics.*.counter\": {\r\n \"path_match\": \"istio.istiod.metrics.*.counter\",\r\n \"mapping\": {\r\n \"time_series_metric\": \"counter\",\r\n \"type\": \"double\"\r\n }\r\n }\r\n },\r\n {\r\n```","sha":"863f6bdb8bca99af02392e74ec75e37373bdcfc0"}}]}] BACKPORT--> Co-authored-by: Julia Bardi <[email protected]>
Hi @juliaElastic, now that this pull request has been merged and we have pending TSDB package migrations that rely on it, we need to update the Kibana version. I would like to confirm if the fix will be included in version 8.9.0 or if we should consider alternative versions such as 8.8.1 or 8.8.2 |
@ritalwar As discussed on slack, we can't backport to 8.8 branch as 8.8.2 is released and the branch is closed. |
Summary
Closes #155004
Found a simplification of adding
time_series_metric
todynamic_templates
.I think tsdb enabled check is not needed similarly to #157047
To test:
metrics-istio.istiod_metric
s index template includestime_series_metric