Skip to content

[Incident management] Callout for alerts that triggered around the same time#223473

Merged
baileycash-elastic merged 24 commits intoelastic:mainfrom
baileycash-elastic:alerting-213020
Jun 24, 2025
Merged

[Incident management] Callout for alerts that triggered around the same time#223473
baileycash-elastic merged 24 commits intoelastic:mainfrom
baileycash-elastic:alerting-213020

Conversation

@baileycash-elastic
Copy link
Copy Markdown
Contributor

@baileycash-elastic baileycash-elastic commented Jun 11, 2025

Summary

Implements #213020
Partially implements filter bar seen with #213015

This PR adds a callout on the alert details page to encourage users to visit the related alerts page when at least one alert was triggered within 30 minutes of the current alert. If no alerts were triggered, the message remains without a call to action.

Screen.Recording.2025-06-12.at.4.23.17.PM.mov

Testing

The related alert query usually find alerts that were raised within a day of each other. To find alerts that were raised within a few minutes, try creating an SLO with a chosen groupBy field that will easily violate a burn rate rule. Alerts should be triggered for each instance within seconds. Once the filter is executed, these alerts should appear without alerts that were triggered earlier in the day.

@baileycash-elastic baileycash-elastic requested review from a team as code owners June 11, 2025 22:02
@botelastic botelastic bot added the Team:actionable-obs Formerly "obs-ux-management", responsible for SLO, o11y alerting, significant events, & synthetics. label Jun 11, 2025
@elasticmachine
Copy link
Copy Markdown
Contributor

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

@github-actions github-actions bot added the author:obs-ux-management PRs authored by the obs ux management team label Jun 11, 2025
@baileycash-elastic baileycash-elastic added release_note:feature Makes this part of the condensed release notes backport:version Backport to applied version labels v8.19.0 and removed author:obs-ux-management PRs authored by the obs ux management team labels Jun 11, 2025
@baileycash-elastic baileycash-elastic changed the title [Alerting] Callout for alerts that triggered around the same time [Incident management] Callout for alerts that triggered around the same time Jun 11, 2025
@baileycash-elastic baileycash-elastic marked this pull request as draft June 11, 2025 22:06
@baileycash-elastic baileycash-elastic marked this pull request as ready for review June 11, 2025 22:28
@baileycash-elastic baileycash-elastic added release_note:skip Skip the PR/issue when compiling release notes and removed release_note:feature Makes this part of the condensed release notes labels Jun 12, 2025
@baileycash-elastic baileycash-elastic marked this pull request as draft June 12, 2025 04:17
Copy link
Copy Markdown
Contributor

@kdelemme kdelemme left a comment

Choose a reason for hiding this comment

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

I just have a few comments/nits but otherwise LGTM. I haven't tested it though

lte: startDate.clone().add(1, 'days').toISOString(),
gte: startDate
.clone()
.subtract(...range)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: Destructuring an array so it becomes the exact arguments expected by the function feels brittle to me.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I felt this was cleaner than having a conditional for the "same time" filter bool * (startDate + endDate) combinations

Copy link
Copy Markdown
Contributor

@kdelemme kdelemme left a comment

Choose a reason for hiding this comment

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

One last question about reusing useBuildRelatedAlertsQuery vs not

@baileycash-elastic baileycash-elastic marked this pull request as ready for review June 12, 2025 19:15
<EuiCallOut>
{i18n.translate('xpack.observability.alertDetails.proximalAlert.description', {
defaultMessage:
'{count, plural, one {# alert was} other {# alerts were}} triggered around the same time.',
Copy link
Copy Markdown
Contributor Author

@baileycash-elastic baileycash-elastic Jun 13, 2025

Choose a reason for hiding this comment

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

@nastasha-solomon @mdbirnstiehl Hey folks! I want to get your feedback on the wording of this callout.
Here's the issue I'm referencing.
Screenshot 2025-06-13 at 12 19 23 PM

Copy link
Copy Markdown
Member

@nastasha-solomon nastasha-solomon Jun 13, 2025

Choose a reason for hiding this comment

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

Thanks for the ping! I'd recommend changing "triggered" to something a bit less harsh like "created" or "generated":

Suggested change
'{count, plural, one {# alert was} other {# alerts were}} triggered around the same time.',
'{count, plural, one {# alert was} other {# alerts were}} created around the same time.',

Another reason is because alerts are only created when the rule is triggered -- at least that's my understanding. Saying that an alert is triggered by an event sorta makes sense, but is less precise than saying that an event triggers a rule, which then creates an alert. That's just my two cents though. Feel free to disagree, especially if this phrasing is used in other places throughout the Observability app.

One more suggestion: I'd change "See more" to "See related alerts." That way, users know exactly what they're navigating to.

label={i18n.translate(
'xpack.observability.alerts.relatedAlerts.proximityCheckboxLabel',
{
defaultMessage: 'Triggered around the same time',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Minor fix:

Suggested change
defaultMessage: 'Triggered around the same time',
defaultMessage: 'Created around the same time',

Copy link
Copy Markdown
Contributor

@jcger jcger left a comment

Choose a reason for hiding this comment

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

I think you are missing the 9.1 label

@baileycash-elastic baileycash-elastic requested a review from a team June 23, 2025 19:25
@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
observability 1312 1317 +5

Async chunks

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

id before after diff
cases 1.3MB 1.3MB +34.0B
embeddableAlertsTable 913.3KB 913.4KB +34.0B
ml 5.4MB 5.4MB +34.0B
observability 1.3MB 1.3MB +2.4KB
securitySolution 9.4MB 9.4MB +34.0B
triggersActionsUi 1.5MB 1.5MB +34.0B
total +2.6KB

History

Copy link
Copy Markdown
Contributor

@adcoelho adcoelho left a comment

Choose a reason for hiding this comment

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

LGTM but was wondering why you want to skip our query context skipAlertsQueryContext in useSearchAlertsQuery.

@baileycash-elastic baileycash-elastic merged commit 7da827e into elastic:main Jun 24, 2025
10 checks passed
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.19

https://github.com/elastic/kibana/actions/runs/15846120627

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jun 24, 2025
…me time (elastic#223473)

## Summary

Implements elastic#213020
Partially implements filter bar seen with elastic#213015

This PR adds a callout on the alert details page to encourage users to
visit the related alerts page when at least one alert was triggered
within 30 minutes of the current alert. If no alerts were triggered, the
message remains without a call to action.

https://github.com/user-attachments/assets/23b2d3e9-353b-45e1-a007-d188db5617fc

## Testing

The related alert query usually find alerts that were raised within a
day of each other. To find alerts that were raised within a few minutes,
try creating an SLO with a chosen groupBy field that will easily violate
a burn rate rule. Alerts should be triggered for each instance within
seconds. Once the filter is executed, these alerts should appear without
alerts that were triggered earlier in the day.

(cherry picked from commit 7da827e)
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
8.19

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

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Jun 24, 2025
… the same time (#223473) (#225026)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[Incident management] Callout for alerts that triggered around the
same time (#223473)](#223473)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Bailey
Cash","email":"bailey.cash@elastic.co"},"sourceCommit":{"committedDate":"2025-06-24T09:03:20Z","message":"[Incident
management] Callout for alerts that triggered around the same time
(#223473)\n\n## Summary\n\nImplements #213020\nPartially implements
filter bar seen with #213015\n\n\nThis PR adds a callout on the alert
details page to encourage users to\nvisit the related alerts page when
at least one alert was triggered\nwithin 30 minutes of the current
alert. If no alerts were triggered, the\nmessage remains without a call
to
action.\n\n\nhttps://github.com/user-attachments/assets/23b2d3e9-353b-45e1-a007-d188db5617fc\n\n\n\n##
Testing\n\nThe related alert query usually find alerts that were raised
within a\nday of each other. To find alerts that were raised within a
few minutes,\ntry creating an SLO with a chosen groupBy field that will
easily violate\na burn rate rule. Alerts should be triggered for each
instance within\nseconds. Once the filter is executed, these alerts
should appear without\nalerts that were triggered earlier in the
day.","sha":"7da827e8d9b1d354c3d0093941e72ca79e821c3d","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:obs-ux-management","backport:version","v9.1.0","v8.19.0"],"title":"[Incident
management] Callout for alerts that triggered around the same
time","number":223473,"url":"https://github.com/elastic/kibana/pull/223473","mergeCommit":{"message":"[Incident
management] Callout for alerts that triggered around the same time
(#223473)\n\n## Summary\n\nImplements #213020\nPartially implements
filter bar seen with #213015\n\n\nThis PR adds a callout on the alert
details page to encourage users to\nvisit the related alerts page when
at least one alert was triggered\nwithin 30 minutes of the current
alert. If no alerts were triggered, the\nmessage remains without a call
to
action.\n\n\nhttps://github.com/user-attachments/assets/23b2d3e9-353b-45e1-a007-d188db5617fc\n\n\n\n##
Testing\n\nThe related alert query usually find alerts that were raised
within a\nday of each other. To find alerts that were raised within a
few minutes,\ntry creating an SLO with a chosen groupBy field that will
easily violate\na burn rate rule. Alerts should be triggered for each
instance within\nseconds. Once the filter is executed, these alerts
should appear without\nalerts that were triggered earlier in the
day.","sha":"7da827e8d9b1d354c3d0093941e72ca79e821c3d"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/223473","number":223473,"mergeCommit":{"message":"[Incident
management] Callout for alerts that triggered around the same time
(#223473)\n\n## Summary\n\nImplements #213020\nPartially implements
filter bar seen with #213015\n\n\nThis PR adds a callout on the alert
details page to encourage users to\nvisit the related alerts page when
at least one alert was triggered\nwithin 30 minutes of the current
alert. If no alerts were triggered, the\nmessage remains without a call
to
action.\n\n\nhttps://github.com/user-attachments/assets/23b2d3e9-353b-45e1-a007-d188db5617fc\n\n\n\n##
Testing\n\nThe related alert query usually find alerts that were raised
within a\nday of each other. To find alerts that were raised within a
few minutes,\ntry creating an SLO with a chosen groupBy field that will
easily violate\na burn rate rule. Alerts should be triggered for each
instance within\nseconds. Once the filter is executed, these alerts
should appear without\nalerts that were triggered earlier in the
day.","sha":"7da827e8d9b1d354c3d0093941e72ca79e821c3d"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Bailey Cash <bailey.cash@elastic.co>
akowalska622 pushed a commit to akowalska622/kibana that referenced this pull request Jun 25, 2025
…me time (elastic#223473)

## Summary

Implements elastic#213020
Partially implements filter bar seen with elastic#213015


This PR adds a callout on the alert details page to encourage users to
visit the related alerts page when at least one alert was triggered
within 30 minutes of the current alert. If no alerts were triggered, the
message remains without a call to action.


https://github.com/user-attachments/assets/23b2d3e9-353b-45e1-a007-d188db5617fc



## Testing

The related alert query usually find alerts that were raised within a
day of each other. To find alerts that were raised within a few minutes,
try creating an SLO with a chosen groupBy field that will easily violate
a burn rate rule. Alerts should be triggered for each instance within
seconds. Once the filter is executed, these alerts should appear without
alerts that were triggered earlier in the day.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes Team:actionable-obs Formerly "obs-ux-management", responsible for SLO, o11y alerting, significant events, & synthetics. v8.19.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants