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

[Synthetics UI] Prefer custom_heartbeat_id to monitor.id for Uptime detail link when present #143128

Conversation

justinkambic
Copy link
Contributor

@justinkambic justinkambic commented Oct 11, 2022

Summary

Resolves #143016.

We link to the Uptime detail link from the Synthetics last 10 runs view. Unfortunately, when there's a custom heartbeat ID, our view is not resilient to this. Uptime UI utilizes the custom ID for its queries, so we need to account for this as long as we are linking to that UI.

@justinkambic justinkambic added bug Fixes for quality problems that affect the customer experience Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability release_note:skip Skip the PR/issue when compiling release notes v8.5.0 v8.6.0 labels Oct 11, 2022
@justinkambic justinkambic self-assigned this Oct 11, 2022
@justinkambic justinkambic requested a review from a team as a code owner October 11, 2022 20:08
@elasticmachine
Copy link
Contributor

Pinging @elastic/uptime (Team:uptime)

Copy link
Contributor

@dominiqueclarke dominiqueclarke left a comment

Choose a reason for hiding this comment

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

LGTM! Tested with project monitors and non project monitors. Now going to the correct href for both.

@@ -118,6 +118,7 @@ export const LastTenTestRuns = () => {
},
];

const historyIdParam = monitor?.custom_heartbeat_id ?? monitor?.id;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion

Suggested change
const historyIdParam = monitor?.custom_heartbeat_id ?? monitor?.id;
const historyIdParam = monitor?.[ConfigKey.CUSTOM_HEARTBEAT_ID] ?? monitor?.id;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

++ I need to get used to relying on these!

@dominiqueclarke
Copy link
Contributor

@elasticmachine merge upstream

@justinkambic justinkambic force-pushed the 143016/fix-link-to-uptime-detail-view-for-lightweight-project-monitor-custom-heartbeat-ids branch from 58e3f04 to c751d83 Compare October 17, 2022 14:26
@justinkambic justinkambic force-pushed the 143016/fix-link-to-uptime-detail-view-for-lightweight-project-monitor-custom-heartbeat-ids branch from c751d83 to 87f061f Compare October 19, 2022 18:39
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Async chunks

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

id before after diff
synthetics 1.0MB 1.0MB +73.0B

History

  • 💔 Build #80763 failed c751d831242f91c2462de308068e8766af191572
  • 💚 Build #80450 succeeded 58e3f04615a0f006a19140354c323002795e0127
  • 💚 Build #79585 succeeded fa3d2e07c3195fead07d915e44c15186aee164ca

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

cc @justinkambic

@justinkambic justinkambic merged commit c25eedc into elastic:main Oct 19, 2022
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 19, 2022
…me detail link when present (elastic#143128)

* Prefer `custom_heartbeat_id` to `monitor.id` when present.

* Prefer `ConfigKey`.

(cherry picked from commit c25eedc)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.5

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 Oct 19, 2022
…me detail link when present (#143128) (#143707)

* Prefer `custom_heartbeat_id` to `monitor.id` when present.

* Prefer `ConfigKey`.

(cherry picked from commit c25eedc)

Co-authored-by: Justin Kambic <jk@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v8.5.0 v8.5.1 v8.6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Synthetics] View History anchor for lightweight project monitors supplies incorrect ID value
5 participants