mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
[Performance] Refactor TTFMP query from
, to
fields (#213911)
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 
This commit is contained in:
parent
48b286e460
commit
e6e78ac6d8
5 changed files with 36 additions and 16 deletions
|
@ -330,8 +330,9 @@ This will be indexed as:
|
|||
"duration": 736, // Event duration as specified when reporting it
|
||||
"meta": {
|
||||
"target": '/home',
|
||||
"query_range_secs": 900
|
||||
"query_offset_secs": 0 // now
|
||||
"query_range_secs": 900, // 15 minutes
|
||||
"query_from_offset_secs": -900 // From 15 minutes ago
|
||||
"query_to_offset_secs": 0 // To now
|
||||
},
|
||||
"context": { // Context holds information identifying the deployment, version, application and page that generated the event
|
||||
"version": "8.16.0-SNAPSHOT",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue