kibana/dev_docs
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
..
assets Developer documentation for designing feature privileges (#166716) 2023-09-27 13:43:55 +02:00
contributing SKA: Update repository structure documentation (#208691) 2025-01-29 13:34:00 -06:00
getting_started SKA: Update broken references and URLs (#206836) 2025-01-28 03:32:48 +00:00
key_concepts [9.0] [Authz] Added allOf and anyOf nested conditions (#215516) (#217051) 2025-04-04 13:13:40 +02:00
lens [Lens] fit line charts by default (#196184) 2024-10-21 15:05:02 +02:00
operations [EuiProvider / Functional tests] Check for EuiProvider Dev Warning (#189018) 2024-08-26 15:08:32 -05:00
shared_ux [Screenshotting] Organize dev docs for screenshotting/chromium (#198100) 2024-10-30 11:55:12 -05:00
tutorials [9.0] [Performance] Refactor TTFMP query from, to fields (#213911) (#217089) 2025-04-07 18:40:14 +03:00
api_welcome.mdx SKA: Update broken references and URLs (#206836) 2025-01-28 03:32:48 +00:00
kibana_server_core_components.mdx Clean up dev docs (#124271) 2022-02-03 10:09:10 -05:00
nav-kibana-dev.docnav.json Adding fips docs to nav (#206935) 2025-01-17 01:38:28 +01:00