[Performance] Refactor TTFMP query from, to fields#213911
[Performance] Refactor TTFMP query from, to fields#213911awahab07 merged 6 commits intoelastic:mainfrom
from, to fields#213911Conversation
…0-refactor-query-field-names
…0-refactor-query-field-names
kpatticha
left a comment
There was a problem hiding this comment.
LGTM.
Could you please update the docs to reflect these changes https://docs.elastic.dev/kibana-dev-docs/tutorial/performance/adding_custom_performance_metrics#add-time-ranges
…0-refactor-query-field-names
💚 Build Succeeded
Metrics [docs]Page load bundle
History
|
…0-refactor-query-field-names
|
Starting backport for target branches: 7.17, 8.16, 8.17, 8.18, 8.x, 9.0 https://github.com/elastic/kibana/actions/runs/13967366151 |
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
Currently Kibana forwards `query_range_secs` and `query_offset_secs` to mark the selected time range when reporting TTFMP event. This format caused some challenges to identify `from`, `to` date offsets in visualizations. To simplify, the PR renames and sends the three fields explicitly: - `query_from_offset_secs` offset to `0` (now), with -ve for past and +ve for future dates - `query_to_offset_secs` offset to `0` (now), with -ve for past and +ve for future dates - `query_range_secs` same as previously sent _This approach is followed after a discussion, and based on the [gist](https://gist.github.com/andrewvc/1f04a57a336d768e4ec5ff2eff06ba54) excerpt:_ ``` Earliest date -> QueryFrom Newest date -> QueryTo Duration -> QueryRange ``` ### Indexing These fields then should be mapped in the EBT indexer to ingest in the top level of the document, eventually removing the need to create runtime fields in data views for visualizations. Also, runtime fields in data views should be updated to reflect this change. For backward compatibility, the runtime fields can cater both the old and new field names conditionally. ### Testing - Ensure that the TTFMP events are correctly reporting the date ranges. ### Example 
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Currently Kibana forwards `query_range_secs` and `query_offset_secs` to mark the selected time range when reporting TTFMP event. This format caused some challenges to identify `from`, `to` date offsets in visualizations. To simplify, the PR renames and sends the three fields explicitly: - `query_from_offset_secs` offset to `0` (now), with -ve for past and +ve for future dates - `query_to_offset_secs` offset to `0` (now), with -ve for past and +ve for future dates - `query_range_secs` same as previously sent _This approach is followed after a discussion, and based on the [gist](https://gist.github.com/andrewvc/1f04a57a336d768e4ec5ff2eff06ba54) excerpt:_ ``` Earliest date -> QueryFrom Newest date -> QueryTo Duration -> QueryRange ``` ### Indexing These fields then should be mapped in the EBT indexer to ingest in the top level of the document, eventually removing the need to create runtime fields in data views for visualizations. Also, runtime fields in data views should be updated to reflect this change. For backward compatibility, the runtime fields can cater both the old and new field names conditionally. ### Testing - Ensure that the TTFMP events are correctly reporting the date ranges. ### Example 
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
1 similar comment
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
@awahab07 please check backports |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
2 similar comments
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Currently Kibana forwards `query_range_secs` and `query_offset_secs` to mark the selected time range when reporting TTFMP event. This format caused some challenges to identify `from`, `to` date offsets in visualizations. To simplify, the PR renames and sends the three fields explicitly: - `query_from_offset_secs` offset to `0` (now), with -ve for past and +ve for future dates - `query_to_offset_secs` offset to `0` (now), with -ve for past and +ve for future dates - `query_range_secs` same as previously sent _This approach is followed after a discussion, and based on the [gist](https://gist.github.com/andrewvc/1f04a57a336d768e4ec5ff2eff06ba54) excerpt:_ ``` Earliest date -> QueryFrom Newest date -> QueryTo Duration -> QueryRange ``` ### Indexing These fields then should be mapped in the EBT indexer to ingest in the top level of the document, eventually removing the need to create runtime fields in data views for visualizations. Also, runtime fields in data views should be updated to reflect this change. For backward compatibility, the runtime fields can cater both the old and new field names conditionally. ### Testing - Ensure that the TTFMP events are correctly reporting the date ranges. ### Example 
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Currently Kibana forwards `query_range_secs` and `query_offset_secs` to mark the selected time range when reporting TTFMP event. This format caused some challenges to identify `from`, `to` date offsets in visualizations. To simplify, the PR renames and sends the three fields explicitly: - `query_from_offset_secs` offset to `0` (now), with -ve for past and +ve for future dates - `query_to_offset_secs` offset to `0` (now), with -ve for past and +ve for future dates - `query_range_secs` same as previously sent _This approach is followed after a discussion, and based on the [gist](https://gist.github.com/andrewvc/1f04a57a336d768e4ec5ff2eff06ba54) excerpt:_ ``` Earliest date -> QueryFrom Newest date -> QueryTo Duration -> QueryRange ``` ### Indexing These fields then should be mapped in the EBT indexer to ingest in the top level of the document, eventually removing the need to create runtime fields in data views for visualizations. Also, runtime fields in data views should be updated to reflect this change. For backward compatibility, the runtime fields can cater both the old and new field names conditionally. ### Testing - Ensure that the TTFMP events are correctly reporting the date ranges. ### Example  (cherry picked from commit e6e78ac) # Conflicts: # src/core/packages/analytics/browser-internal/src/track_performance_measure_entries.test.ts # src/core/packages/analytics/browser-internal/src/track_performance_measure_entries.ts # src/platform/packages/shared/kbn-ebt-tools/src/performance_metrics/context/measure_interaction/index.ts # src/platform/packages/shared/kbn-ebt-tools/src/performance_metrics/context/measure_interaction/measure_interaction.test.tsx
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
Currently Kibana forwards `query_range_secs` and `query_offset_secs` to mark the selected time range when reporting TTFMP event. This format caused some challenges to identify `from`, `to` date offsets in visualizations. To simplify, the PR renames and sends the three fields explicitly: - `query_from_offset_secs` offset to `0` (now), with -ve for past and +ve for future dates - `query_to_offset_secs` offset to `0` (now), with -ve for past and +ve for future dates - `query_range_secs` same as previously sent _This approach is followed after a discussion, and based on the [gist](https://gist.github.com/andrewvc/1f04a57a336d768e4ec5ff2eff06ba54) excerpt:_ ``` Earliest date -> QueryFrom Newest date -> QueryTo Duration -> QueryRange ``` ### Indexing These fields then should be mapped in the EBT indexer to ingest in the top level of the document, eventually removing the need to create runtime fields in data views for visualizations. Also, runtime fields in data views should be updated to reflect this change. For backward compatibility, the runtime fields can cater both the old and new field names conditionally. ### Testing - Ensure that the TTFMP events are correctly reporting the date ranges. ### Example  (cherry picked from commit e6e78ac) # Conflicts: # src/core/packages/analytics/browser-internal/src/track_performance_measure_entries.test.ts # src/core/packages/analytics/browser-internal/src/track_performance_measure_entries.ts # src/platform/packages/shared/kbn-ebt-tools/src/performance_metrics/context/measure_interaction/index.ts # src/platform/packages/shared/kbn-ebt-tools/src/performance_metrics/context/measure_interaction/measure_interaction.test.tsx
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
1 similar comment
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
#217089) # Backport This will backport the following commits from `main` to `9.0`: - [[Performance] Refactor TTFMP query `from`, `to` fields (#213911)](#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","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","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","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>
#217090) # Backport This will backport the following commits from `main` to `8.x`: - [[Performance] Refactor TTFMP query `from`, `to` fields (#213911)](#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","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","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","sha":"e6e78ac6d83fe9c4a83785c717fb1b7f3fedbf0e"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
… (#217091) # Backport This will backport the following commits from `main` to `8.18`: - [[Performance] Refactor TTFMP query `from`, `to` fields (#213911)](#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","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","sha":"e6e78ac6d83fe9c4a83785c717fb1b7f3fedbf0e"}},"sourceBranch":"main","suggestedTargetBranches":[],"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","sha":"e6e78ac6d83fe9c4a83785c717fb1b7f3fedbf0e"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/217090","number":217090,"state":"OPEN"},{"url":"https://github.com/elastic/kibana/pull/217089","number":217089,"branch":"9.0","state":"OPEN"}]}] BACKPORT-->
Summary
The PR adds
Currently Kibana forwards
query_range_secsandquery_offset_secsto mark the selected time range when reporting TTFMP event. This format caused some challenges to identifyfrom,todate offsets in visualizations.To simplify, the PR renames and sends the three fields explicitly:
query_from_offset_secsoffset to0(now), with -ve for past and +ve for future datesquery_to_offset_secsoffset to0(now), with -ve for past and +ve for future datesquery_range_secssame as previously sentThis approach is followed after a discussion, and based on the gist excerpt:
Indexing
These fields then should be mapped in the EBT indexer to ingest in the top level of the document, eventually removing the need to create runtime fields in data views for visualizations.
Also, runtime fields in data views should be updated to reflect this change. For backward compatibility, the runtime fields can cater both the old and new field names conditionally.
Testing
Example