Skip to content

[Uptime] Hide app if no data is available#159118

Merged
shahzad31 merged 17 commits intoelastic:mainfrom
shahzad31:hide-uptime
Jun 13, 2023
Merged

[Uptime] Hide app if no data is available#159118
shahzad31 merged 17 commits intoelastic:mainfrom
shahzad31:hide-uptime

Conversation

@shahzad31
Copy link
Copy Markdown
Contributor

@shahzad31 shahzad31 commented Jun 6, 2023

Summary

Fixes #158731

Hide app if no data is available !!

Uptime app will be hidden if no data is found within last week !!

This behaviour can be disabled from advanced settings

image

Release note

The Uptime app now gets hidden from the interface when it doesn't have any data for more than a week. If you have a standalone Heartbeat pushing data to Elasticsearch, the Uptime app will be considered active. You can disable this automatic behavior from the advanced settings in Kibana using the Always show legacy Uptime app option.
For synthetic monitoring, we now recommend to use the new Synthetics app.

@ghost
Copy link
Copy Markdown

ghost commented Jun 6, 2023

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

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

@shahzad31 shahzad31 marked this pull request as ready for review June 8, 2023 08:42
@shahzad31 shahzad31 requested review from a team as code owners June 8, 2023 08:42
@shahzad31 shahzad31 requested a review from a team June 8, 2023 08:42
@shahzad31 shahzad31 added release_note:skip Skip the PR/issue when compiling release notes v8.9.0 release_note:deprecation release_note:breaking and removed release_note:skip Skip the PR/issue when compiling release notes release_note:deprecation labels Jun 8, 2023
@botelastic botelastic bot added the Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability label Jun 8, 2023
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/uptime (Team:uptime)

Copy link
Copy Markdown
Member

@afharo afharo left a comment

Choose a reason for hiding this comment

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

Core changes LGTM

Copy link
Copy Markdown
Member

@florent-leborgne florent-leborgne left a comment

Choose a reason for hiding this comment

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

Suggested some tweaks to the copy. Let me know if you need me to revisit.

shahzad31 and others added 4 commits June 8, 2023 12:05
Copy link
Copy Markdown
Contributor

@awahab07 awahab07 left a comment

Choose a reason for hiding this comment

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

  • Tested and the feature flag works as expected.

  • If heartbeat-*/synthetics-* exists, Uptime app will be enabled.

  • 👉 The current implementation will enable the Uptime app regardless of the availability of legacy monitors, as it just checks the presence of the index.

  • 👉 On a new cluster, by default, Uptime has synthetics-* as index in settings, whereas heartbeat pushes to heartbeat-*. If a mismatch happens, the only way to enabled Uptime app would be via feature flag first and then a change of index in Uptime -> settings would be required.

@shahzad31 shahzad31 requested a review from awahab07 June 12, 2023 08:23
Copy link
Copy Markdown
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.

AO changes LGTM

@kibana-ci
Copy link
Copy Markdown

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
synthetics 1249 1252 +3

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
observability 507 515 +8

Any counts in public APIs

Total count of every any typed public API. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats any for more detailed information.

id before after diff
observability 43 45 +2

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.2MB 1.2MB -20.0B

Page load bundle

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

id before after diff
observability 97.3KB 97.5KB +130.0B
observabilityShared 41.5KB 41.6KB +58.0B
synthetics 28.4KB 29.1KB +790.0B
total +978.0B
Unknown metric groups

API count

id before after diff
observability 515 523 +8

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
securitySolution 410 414 +4
total +6

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
securitySolution 491 495 +4
total +6

History

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

Copy link
Copy Markdown
Contributor

@awahab07 awahab07 left a comment

Choose a reason for hiding this comment

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

There's still an issue that, by default Uptime uses synthetics-* index, same as with Synthetics. So on a new cluster, if there are synthetics monitors with results indexed, Uptime would be enabled as in the query config_id is not being considered, as suggested in the AC.

Copy link
Copy Markdown
Contributor

@awahab07 awahab07 left a comment

Choose a reason for hiding this comment

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

Tested the flow and it LGTM!

@shahzad31 shahzad31 merged commit ea77b0d into elastic:main Jun 13, 2023
@shahzad31 shahzad31 deleted the hide-uptime branch June 13, 2023 10:14
@kibanamachine kibanamachine added the backport:skip This PR does not require backporting label Jun 13, 2023
jloleysens added a commit to jloleysens/kibana that referenced this pull request Jun 13, 2023
* main:
  [Lens] Add custom formatter within the Lens editor (elastic#158468)
  [Uptime] Hide app if no data is available (elastic#159118)
  [CodeEditor] Add grok highlighting (elastic#159334)
jloleysens added a commit to jloleysens/kibana that referenced this pull request Jun 13, 2023
* main: (199 commits)
  [Lens] Add custom formatter within the Lens editor (elastic#158468)
  [Uptime] Hide app if no data is available (elastic#159118)
  [CodeEditor] Add grok highlighting (elastic#159334)
  Expose decoded cloudId components from the cloud plugin's contract (elastic#159442)
  [Profiling] Use collector and symbolizer integrations in the add data page (elastic#159481)
  [Infrastructure UI] Hosts View: Unified Search bar with auto-refresh enabled (elastic#157011)
  [APM] Add feature flag for not available apm schema (elastic#158911)
  [Lens] Remove deprecated componentWillReceiveProps usage (elastic#159502)
  [api-docs] 2023-06-13 Daily api_docs build (elastic#159536)
  [data views] Use versioned router for REST routes (elastic#158608)
  [maps] fix geo line source not loaded unless maps application is opened (elastic#159432)
  [Enterprise Search][Search application]Fix Create Api key url (elastic#159519)
  [Security Solution] Increase timeout for indexing hosts (elastic#159518)
  dashboard Reset button disable (elastic#159430)
  [Security Solution] Unskip Endpoint API tests after package fix (elastic#159484)
  [Synthetics] adjust alert timing (elastic#159511)
  [ResponseOps][rule registry] Remove usages of `refresh: true` (elastic#159252)
  Revert "Remove unused package (elastic#158597)"
  [Serverless] Adding config to disable authentication on task manager background worker utilization API (elastic#159505)
  Remove unused package (elastic#158597)
  ...
@paulb-elastic
Copy link
Copy Markdown
Contributor

@florent-leborgne are you happy with the Release Note section in the main description

@florent-leborgne
Copy link
Copy Markdown
Member

@paulb-elastic here's a slightly updated version with a more conversational tone.

The Uptime app now gets hidden from the interface when it doesn't have any data for more than a week. If you have a standalone heartbeat pushing data to Elasticsearch, the Uptime app will be considered active. You can disable this automatic behavior from the advanced settings in Kibana using the Always show legacy Uptime app option.
For synthetic monitoring, we now recommend to use the new Synthetics app.

How does this sound to you? Feel free to make any adjustment. I've also fixed the option name that was changed in this PR.

@paulb-elastic
Copy link
Copy Markdown
Contributor

Thanks @florent-leborgne I've updated the copy in the description to your suggestion.

Looks like the release note for 8.9 hasn't been cut yet, so this update should be automatic, but I'll keep an eye on it in case I need to update the CHANGELOG manually.

@paulb-elastic
Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:breaking Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v8.9.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Synthetics] Hide Uptime by default if no data

10 participants