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

[Alert details page] Fix metric threshold chart time range for bigger lookback windows #184409

Merged
merged 3 commits into from
Jun 3, 2024

Conversation

maryam-saeidi
Copy link
Member

Fixes #183625
Fixes #183130

Summary

This PR fixes #183130 by removing Last 1 minute subtitle in the alert details pages of the metric and custom threshold rules.

Before After
image image

Also, it adjusts the chart time range by extending it at least 20 times the rule execution interval to avoid showing no data for bigger intervals such as 1 hour or 1 day.

@maryam-saeidi maryam-saeidi added the release_note:skip Skip the PR/issue when compiling release notes label May 29, 2024
@maryam-saeidi maryam-saeidi self-assigned this May 29, 2024
@maryam-saeidi maryam-saeidi requested a review from a team as a code owner May 29, 2024 10:34
@botelastic botelastic bot added ci:project-deploy-observability Create an Observability project Team:obs-ux-management Observability Management User Experience Team labels May 29, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-management-team (Team:obs-ux-management)

@apmmachine
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

{
defaultMessage: 'Threshold breached',
{rule.params.criteria.map((criterion, index) => {
const timeRange = getPaddedAlertTimeRange(
Copy link
Member Author

Choose a reason for hiding this comment

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

In this section, I only added timeRange and removed FormattedMessage related to Last {lookback} {timeLabel}.

@fkanout fkanout self-requested a review May 30, 2024 09:15
Copy link
Contributor

@fkanout fkanout left a comment

Choose a reason for hiding this comment

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

@maryam-saeidi, I have created a rule with 3 hours lookback window. And after 7 minutes of the trigger time, still can't see the alert annotation.

Screenshot 2024-05-30 at 14 22 17

Screenshot 2024-05-30 at 14 18 37

Copy link
Contributor

@fkanout fkanout left a comment

Choose a reason for hiding this comment

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

I have tested many lookback windows with different values and the bucket size in chart was always matching the rule lookback time. 💪🏻 !

@maryam-saeidi
Copy link
Member Author

maryam-saeidi commented May 30, 2024

@maryam-saeidi, I have created a rule with 3 hours lookback window. And after 7 minutes of the trigger time, still can't see the alert annotation.

Screenshot 2024-05-30 at 14 22 17

Screenshot 2024-05-30 at 14 18 37

@fkanout Good catch! It seems it happens due to the gap between last aggregated data and alert annotation:

Aggregated data before alert Alert annotation
image image

Would you mind creating a ticket for it?
Update: create a separate ticket for it (#184574)

@kibana-ci
Copy link
Collaborator

kibana-ci commented Jun 3, 2024

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
observability 491 490 -1

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/observability-get-padded-alert-time-range-util 3 6 +3

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
apm 3.3MB 3.3MB +70.0B
infra 1.5MB 1.5MB -79.0B
observability 309.5KB 308.6KB -953.0B
total -962.0B

Canvas Sharable Runtime

The Canvas "shareable runtime" is an bundle produced to enable running Canvas workpads outside of Kibana. This bundle is included in third-party webpages that embed canvas and therefor should be as slim as possible.

id before after diff
module count - 5499 +5499
total size - 8.9MB +8.9MB

Page load bundle

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

id before after diff
observability 122.6KB 122.7KB +70.0B
Unknown metric groups

API count

id before after diff
@kbn/observability-get-padded-alert-time-range-util 3 6 +3

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @maryam-saeidi

Copy link
Contributor

@fkanout fkanout left a comment

Choose a reason for hiding this comment

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

The issue I mentioned -missing alert annotation is already exists and not related to the PR.
So I approve this one and fix the other issue in a separate one. Thanks @maryam-saeidi for creating the issue.

@maryam-saeidi maryam-saeidi merged commit f2e4396 into elastic:main Jun 3, 2024
21 checks passed
@maryam-saeidi maryam-saeidi deleted the 183625-fix-no-data-chart branch June 3, 2024 12:10
@maryam-saeidi maryam-saeidi restored the 183625-fix-no-data-chart branch June 3, 2024 12:10
@maryam-saeidi maryam-saeidi deleted the 183625-fix-no-data-chart branch June 3, 2024 12:10
@kibanamachine kibanamachine added v8.15.0 backport:skip This commit does not require backporting labels Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting ci:project-deploy-observability Create an Observability project release_note:skip Skip the PR/issue when compiling release notes Team:obs-ux-management Observability Management User Experience Team v8.15.0
Projects
None yet
6 participants