kibana/dev_docs/tutorials
Abdul Wahab Zahid ebddcc7ffe
[9.0] [Performance] Refactor TTFMP query from, to fields (#213911) (#217089)
# Backport

This will backport the following commits from `main` to `9.0`:
- [[Performance] Refactor TTFMP query `from`, `to` fields
(#213911)](https://github.com/elastic/kibana/pull/213911)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Abdul Wahab
Zahid","email":"awahab07@yahoo.com"},"sourceCommit":{"committedDate":"2025-03-20T10:40:24Z","message":"[Performance]
Refactor TTFMP query `from`, `to` fields (#213911)\n\nCurrently Kibana
forwards `query_range_secs` and `query_offset_secs` to\nmark the
selected time range when reporting TTFMP event. This format\ncaused some
challenges to identify `from`, `to` date offsets
in\nvisualizations.\n\nTo simplify, the PR renames and sends the three
fields explicitly:\n- `query_from_offset_secs` offset to `0` (now), with
-ve for past and\n+ve for future dates\n- `query_to_offset_secs` offset
to `0` (now), with -ve for past and +ve\nfor future dates\n-
`query_range_secs` same as previously sent\n\n_This approach is followed
after a discussion, and based on
the\n[gist](https://gist.github.com/andrewvc/1f04a57a336d768e4ec5ff2eff06ba54)\nexcerpt:_\n\n```\nEarliest
date -> QueryFrom\nNewest date -> QueryTo\nDuration ->
QueryRange\n```\n\n### Indexing\nThese fields then should be mapped in
the EBT indexer to ingest in the\ntop level of the document, eventually
removing the need to create\nruntime fields in data views for
visualizations.\n\nAlso, runtime fields in data views should be updated
to reflect this\nchange. For backward compatibility, the runtime fields
can cater both\nthe old and new field names conditionally.\n\n###
Testing\n- Ensure that the TTFMP events are correctly reporting the date
ranges.\n\n###
Example\n\n![image](https://github.com/user-attachments/assets/529507fc-66f7-440a-8bbb-b34176e8d093)","sha":"e6e78ac6d83fe9c4a83785c717fb1b7f3fedbf0e","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport
missing","v9.1.0","v8.19.0"],"title":"[Performance] Refactor TTFMP query
`from`, `to`
fields","number":213911,"url":"https://github.com/elastic/kibana/pull/213911","mergeCommit":{"message":"[Performance]
Refactor TTFMP query `from`, `to` fields (#213911)\n\nCurrently Kibana
forwards `query_range_secs` and `query_offset_secs` to\nmark the
selected time range when reporting TTFMP event. This format\ncaused some
challenges to identify `from`, `to` date offsets
in\nvisualizations.\n\nTo simplify, the PR renames and sends the three
fields explicitly:\n- `query_from_offset_secs` offset to `0` (now), with
-ve for past and\n+ve for future dates\n- `query_to_offset_secs` offset
to `0` (now), with -ve for past and +ve\nfor future dates\n-
`query_range_secs` same as previously sent\n\n_This approach is followed
after a discussion, and based on
the\n[gist](https://gist.github.com/andrewvc/1f04a57a336d768e4ec5ff2eff06ba54)\nexcerpt:_\n\n```\nEarliest
date -> QueryFrom\nNewest date -> QueryTo\nDuration ->
QueryRange\n```\n\n### Indexing\nThese fields then should be mapped in
the EBT indexer to ingest in the\ntop level of the document, eventually
removing the need to create\nruntime fields in data views for
visualizations.\n\nAlso, runtime fields in data views should be updated
to reflect this\nchange. For backward compatibility, the runtime fields
can cater both\nthe old and new field names conditionally.\n\n###
Testing\n- Ensure that the TTFMP events are correctly reporting the date
ranges.\n\n###
Example\n\n![image](https://github.com/user-attachments/assets/529507fc-66f7-440a-8bbb-b34176e8d093)","sha":"e6e78ac6d83fe9c4a83785c717fb1b7f3fedbf0e"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/213911","number":213911,"mergeCommit":{"message":"[Performance]
Refactor TTFMP query `from`, `to` fields (#213911)\n\nCurrently Kibana
forwards `query_range_secs` and `query_offset_secs` to\nmark the
selected time range when reporting TTFMP event. This format\ncaused some
challenges to identify `from`, `to` date offsets
in\nvisualizations.\n\nTo simplify, the PR renames and sends the three
fields explicitly:\n- `query_from_offset_secs` offset to `0` (now), with
-ve for past and\n+ve for future dates\n- `query_to_offset_secs` offset
to `0` (now), with -ve for past and +ve\nfor future dates\n-
`query_range_secs` same as previously sent\n\n_This approach is followed
after a discussion, and based on
the\n[gist](https://gist.github.com/andrewvc/1f04a57a336d768e4ec5ff2eff06ba54)\nexcerpt:_\n\n```\nEarliest
date -> QueryFrom\nNewest date -> QueryTo\nDuration ->
QueryRange\n```\n\n### Indexing\nThese fields then should be mapped in
the EBT indexer to ingest in the\ntop level of the document, eventually
removing the need to create\nruntime fields in data views for
visualizations.\n\nAlso, runtime fields in data views should be updated
to reflect this\nchange. For backward compatibility, the runtime fields
can cater both\nthe old and new field names conditionally.\n\n###
Testing\n- Ensure that the TTFMP events are correctly reporting the date
ranges.\n\n###
Example\n\n![image](https://github.com/user-attachments/assets/529507fc-66f7-440a-8bbb-b34176e8d093)","sha":"e6e78ac6d83fe9c4a83785c717fb1b7f3fedbf0e"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-04-07 18:40:14 +03:00
..
data SKA: Update broken references and URLs (#206836) 2025-01-28 03:32:48 +00:00
performance [9.0] [Performance] Refactor TTFMP query from, to fields (#213911) (#217089) 2025-04-07 18:40:14 +03:00
screenshotting [Screenshotting] Organize dev docs for screenshotting/chromium (#198100) 2024-10-30 11:55:12 -05:00
advanced_settings.mdx [Advanced settings] Update migration guidance in advanced settings tutorial (#208010) 2025-01-29 14:42:29 +01:00
apm_ui.png Debugging with apm - fixes and tutorial (#127892) 2022-03-22 14:56:37 +02:00
building_a_kibana_distributable.mdx [api-docs] follow the correct schema for frontmatter (#138348) 2022-08-10 17:17:50 -05:00
ci.mdx [9.0] [FIPS][Cloud][Build] Add FIPS cloud image. Convert base image to Wolfi. (#213163) (#216203) 2025-03-28 12:33:58 -05:00
configuring_cross_cluster_search.mdx [dev docs] How to set up cross cluster search locally (#182025) 2024-04-30 12:46:21 -05:00
data_views.mdx [api-docs] follow the correct schema for frontmatter (#138348) 2022-08-10 17:17:50 -05:00
debugging.mdx [9.0] [Dev Docs] Add VS Code configurations to Dev Docs Debugging Tutorial (#212807) (#213415) 2025-03-06 18:20:39 +01:00
debugging_fips_test_failures.mdx [9.0] SKA: Relocate "platform" packages that remain on /packages (#208704) (#212224) 2025-02-28 10:10:29 +01:00
development_windows.mdx [api-docs] follow the correct schema for frontmatter (#138348) 2022-08-10 17:17:50 -05:00
endpoints.mdx Deprecated authRequired in favor of security.authc.enabled (#202414) 2024-12-10 11:24:41 +01:00
expressions.mdx [api-docs] follow the correct schema for frontmatter (#138348) 2022-08-10 17:17:50 -05:00
fips_test_failure_license_override_example.png Adding documentation to aid team in triaging FIPS Test Failures (#203008) 2025-01-14 07:53:28 -05:00
generating_oas_for_http_apis.mdx [DOCS] Add more examples for generating openAPI documents (#200262) 2024-11-25 19:18:50 -06:00
kibana_page_template.mdx Upgrade EUI to v63.0.6 - updates to new EuiPageTemplate and deprecates old page components (#139524) 2022-09-07 15:35:23 -05:00
saved_objects.mdx Document that index/enable: false SO mappings is an anti-pattern (#201969) 2024-11-28 17:50:34 -06:00
submit_a_pull_request.mdx [ci] Remove duplicate backport action (#190643) 2024-08-20 08:23:25 -05:00
testing_plugins.mdx Updates internal dev docs for Saved Objects (#178058) 2024-03-07 08:16:28 -07:00
versioning_http_apis.mdx [dev-docs] Adds section explaining internal and public APIs (#195840) 2024-10-11 16:16:47 +00:00
versioning_interfaces.mdx [Versioned APIs] Versioned interfaces dev docs guide (#150705) 2023-03-01 16:45:43 +01:00