Skip to content
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

[Performance] Refactor TTFMP query from, to fields #213911

Conversation

awahab07
Copy link
Contributor

@awahab07 awahab07 commented Mar 11, 2025

Summary

The PR adds

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 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

image

@awahab07 awahab07 added release_note:skip Skip the PR/issue when compiling release notes backport:all-open Backport to all branches that could still receive a release labels Mar 11, 2025
@awahab07 awahab07 requested a review from a team March 11, 2025 12:45
@awahab07 awahab07 requested a review from a team as a code owner March 11, 2025 12:45
@kpatticha kpatticha self-requested a review March 14, 2025 13:08
Copy link
Contributor

@kpatticha kpatticha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
core 430.8KB 430.9KB +65.0B

History

@awahab07 awahab07 merged commit e6e78ac into elastic:main Mar 20, 2025
13 checks passed
@kibanamachine
Copy link
Contributor

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

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
7.17 Backport failed because of merge conflicts
8.16 Backport failed because of merge conflicts
8.17 Backport failed because of merge conflicts
8.18 Backport failed because of merge conflicts

You might need to backport the following PRs to 8.18:
- [Obs Onboarding] Add page rendering performance monitoring (#213769)
8.x Backport failed because of merge conflicts
9.0 Backport failed because of merge conflicts

You might need to backport the following PRs to 9.0:
- [Obs Onboarding] Add page rendering performance monitoring (#213769)
- [Perfomance] Add Inline documentation for TTFMP (#212393)
- [Perfomance] Add is_initial_load meta (#206645)

Manual backport

To create the backport manually run:

node scripts/backport --pr 213911

Questions ?

Please refer to the Backport tool documentation

@awahab07 awahab07 removed the backport:all-open Backport to all branches that could still receive a release label Mar 20, 2025
clintandrewhall pushed a commit to clintandrewhall/kibana that referenced this pull request Mar 20, 2025
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

![image](https://github.com/user-attachments/assets/529507fc-66f7-440a-8bbb-b34176e8d093)
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Mar 21, 2025
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 213911 locally

JoseLuisGJ pushed a commit to JoseLuisGJ/kibana that referenced this pull request Mar 24, 2025
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

![image](https://github.com/user-attachments/assets/529507fc-66f7-440a-8bbb-b34176e8d093)
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 213911 locally

1 similar comment
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 213911 locally

@nickofthyme
Copy link
Contributor

@awahab07 please check backports

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 213911 locally

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 213911 locally

2 similar comments
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 213911 locally

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 213911 locally

cqliu1 pushed a commit to cqliu1/kibana that referenced this pull request Mar 31, 2025
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

![image](https://github.com/user-attachments/assets/529507fc-66f7-440a-8bbb-b34176e8d093)
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 213911 locally

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 213911 locally

awahab07 added a commit to awahab07/kibana that referenced this pull request Apr 3, 2025
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

![image](https://github.com/user-attachments/assets/529507fc-66f7-440a-8bbb-b34176e8d093)

(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
@awahab07
Copy link
Contributor Author

awahab07 commented Apr 3, 2025

💚 All backports created successfully

Status Branch Result
8.18

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

awahab07 added a commit to awahab07/kibana that referenced this pull request Apr 3, 2025
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

![image](https://github.com/user-attachments/assets/529507fc-66f7-440a-8bbb-b34176e8d093)

(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
@kibanamachine
Copy link
Contributor

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
@kibanamachine
Copy link
Contributor

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.

awahab07 added a commit that referenced this pull request Apr 7, 2025
#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![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>
awahab07 added a commit that referenced this pull request Apr 7, 2025
#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![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-->
awahab07 added a commit that referenced this pull request Apr 7, 2025
… (#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![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":[],"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,"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-->
@kibanamachine kibanamachine added v8.18.0 and removed backport missing Added to PRs automatically when the are determined to be missing a backport. labels Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes v8.18.0 v8.19.0 v9.0.0 v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants