Skip to content

[Alerting] [Incident Management] Show "Created" column for alerts#223972

Closed
baileycash-elastic wants to merge 17 commits intoelastic:mainfrom
baileycash-elastic:alerting-218172
Closed

[Alerting] [Incident Management] Show "Created" column for alerts#223972
baileycash-elastic wants to merge 17 commits intoelastic:mainfrom
baileycash-elastic:alerting-218172

Conversation

@baileycash-elastic
Copy link
Copy Markdown
Contributor

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

Summary

Implements #218172

Adds a "created" column for related alerts that shows either a relative time value or an absolute timestamp of when the alert was triggered/created if the duration is greater than 2 hours. This PR also sets up the time duration display logic to be separated out into a reusable component. Note that the issue asks for the column to be labeled "Triggered," but following a discussion with @nastasha-solomon on a this PR, I used the word "Created".

New Package

Implements the formatted date string as a reusable package.
The package has two new functions:

  • Pass a timestamp as a millisecond numeric value, receive a string with the elapsed time in human readable format in either: hours/minutes OR days.
  • Render a tooltip component that when hovered over displays the original timestamp in a human-readable format.
  • This tooltip also toggles the display text between the elapsed time and the original timestamp. A threshold property is provided to decide when the toggle occurs, and is measured in hours, based on ticket requirements. (Our use case is 2 hours, but we can change it to 24+ for other cases. This process supports displaying elapsed time in days).

This package replaces the datetime formatter from the observability plugin utils, which is its own exported member.

Screenshot 2025-06-25 at 12 02 48 PM

@github-actions github-actions bot added the author:obs-ux-management PRs authored by the obs ux management team label Jun 13, 2025
@baileycash-elastic baileycash-elastic marked this pull request as ready for review June 24, 2025 20:04
@baileycash-elastic baileycash-elastic requested a review from a team as a code owner June 24, 2025 20:04
@botelastic botelastic bot added the Team:actionable-obs Formerly "obs-ux-management", responsible for SLO, o11y alerting, significant events, & synthetics. label Jun 24, 2025
@elasticmachine
Copy link
Copy Markdown
Contributor

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

@baileycash-elastic baileycash-elastic added v8.19.0 v9.1.0 backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes labels Jun 24, 2025
@baileycash-elastic baileycash-elastic requested a review from a team June 24, 2025 21:48
@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #37 / Reporting Functional Tests with Security enabled Access to Management > Reporting Schedules does not allow user to access schedules that does not have reporting privileges

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
observability 1323 1325 +2
profiling 276 279 +3
total +5

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/elapsed-datetime-formatter - 14 +14
observability 620 617 -3
total +11

Async chunks

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

id before after diff
observability 1.3MB 1.3MB +1.8KB
profiling 360.1KB 360.6KB +508.0B
total +2.3KB

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
observability 23 22 -1

Page load bundle

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

id before after diff
observability 93.5KB 93.0KB -578.0B
profiling 18.4KB 18.5KB +66.0B
total -512.0B
Unknown metric groups

API count

id before after diff
@kbn/elapsed-datetime-formatter - 17 +17
observability 627 624 -3
total +14

History

@baileycash-elastic baileycash-elastic marked this pull request as draft June 25, 2025 02:05
@elasticmachine
Copy link
Copy Markdown
Contributor

🤖 Jobs for this PR can be triggered through checkboxes. 🚧

ℹ️ To trigger the CI, please tick the checkbox below 👇

  • Click to trigger kibana-pull-request for this PR!
  • Click to trigger kibana-deploy-project-from-pr for this PR!
  • Click to trigger kibana-deploy-cloud-from-pr for this PR!

baileycash-elastic added a commit that referenced this pull request Jun 27, 2025
…obs plugin] (#225193)

## Summary

Implements #218172 

Adds a "triggered" column for related alerts that shows either a
relative time value or an absolute timestamp of when the alert was
triggered/created if the duration is greater than 2 hours. This PR also
sets up the time duration display logic to be separated out into a
reusable component. This component was inserted into the common folder
of the observability plugin and is exported for use in other packages.

Note: There is a [draft
PR](#223972) where the elapsed
time tooltip component was created as a kibana package. This PR
encourages wider use across the app, but it fragments the design of
observability formatters by moving the datetime formatter to the
package.

<img width="679" alt="Screenshot 2025-06-13 at 4 01 27 PM"
src="https://github.com/user-attachments/assets/9150ffc5-f6f4-4760-b5ea-7cc91d60ea3f"
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author:obs-ux-management PRs authored by the obs ux management team 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.

4 participants