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

[Uptime] Remove latency warnings on monitor management UI #129597

Merged
merged 1 commit into from
Apr 13, 2022

Conversation

lucasfcosta
Copy link
Contributor

@lucasfcosta lucasfcosta commented Apr 6, 2022

Summary

This PR removes the latency warnings one would get when exceeding the minimum latency in the monitor management UI.

It complements the work we had previously done for https://github.com/elastic/synthetics-service/issues/324. It also adds work on top of #127961.

In the previous cloud/synthetics meeting we have decided we would scrape these warnings because latency doesn't actually impact the platform's usage so we don't need to apply a minimum.

PS: I've added this PR to the board so that we can be sure we have done Post-FF testing on it, not only on the first one. I've also updated the previous PR with a link to this one to be sure people will be testing the right thing.

Given we're removing functionality that shouldn't be there, I've also added the bug label to this.

How to test this PR Locally

  1. Create a new manifest.json with the following content and place it under a folder named, for example, manifest_folder.
    ⚠️ Notice there's no latency limits here.
    {
      "throttling": {
        "downloadBandwidthLimit": 20,
        "uploadBandwidthLimit": 10
      },
      "locations": {
        "Local Synth Node [MANIFEST]": {
          "url": "https://localhost:10001",
          "geo": {
            "name": "Example - Local",
            "location": {"lat": 41.25, "lon": -95.86}
          },
          "status": "beta"
        }
      }
    }
  2. Run an HTTP server to serve the contents of the manifest_folder
    $ npx http-server manifest_folder --port 8082
    
  3. In Kibana's config, fill the following options:
    # Make sure your pods will be able to send data to ES which should be bound to your host's 9200 port
    xpack.uptime.service.hosts: [http://host.docker.internal:9200]
    
    # Add the URL for the manifest with the `throttling` configs you're serving
    xpack.uptime.service.manifestUrl: http://localhost:8082/manifest.json
    
    # Make sure to disable the devUrl so you're only fetching locations from the `manifest` as we'll do in production
    # xpack.uptime.service.devUrl: https://localhost:10001
    
    # Enable the Monitor Management UI
    xpack.uptime.ui.monitorManagement.enabled: true
  4. Run the service locally
    $ DEV=true LOGLEVEL=trace CACERTFILE=./k8s/cert-test/build/bundle.pem SERVERCERT=./k8s/cert-test/build/local-server.pem SERVERKEYFILE=./k8s/cert-test/build/local-server.key PORT=10001 ./synthetics-service
    
  5. Run Kibana and try to add a monitor. You should see the warnings above when exceeding the limits defined in your manifest.json file.
    You should be able to set latency values to any value and shouldn't see a warning.
  6. Disable throttling and you should see a warning about the automatic caps.
  7. Create a monitor with a particular throttling value set and save it. Use the following code for that monitor:
    step("load homepage", async () => {
        await page.goto('https://www.fast.com');
    });
    
    step("wait for test", async () => {
      await page.waitForSelector('#show-more-details-link');
      await page.waitForTimeout(10000);
      await page.click("#show-more-details-link");
    });
    
    step("wait for up/lat", async () => {
      await page.waitForSelector(".extra-measurement-value-container.succeeded");
      await page.waitForTimeout(10000);
    });
  8. Wait for that monitor to run and ensure your throttling values have been applied.
  9. Create a monitor with throttling disabled using the same script as above and confirm that your script has not been throtted.
    ⚠️ It will be throttled on the service because of platform limits.
  10. Create a monitor with throttling values which exceed the limits for the node. You should still be able to save such monitors.

⚠️ You should not be able to see these warnings in the Fleet UI.

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@lucasfcosta lucasfcosta added bug Fixes for quality problems that affect the customer experience Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability auto-backport Deprecated - use backport:version if exact versions are needed v8.2.0 v8.3.0 labels Apr 6, 2022
@lucasfcosta lucasfcosta requested a review from a team as a code owner April 6, 2022 13:45
@elasticmachine
Copy link
Contributor

Pinging @elastic/uptime (Team:uptime)

@lucasfcosta lucasfcosta added the release_note:skip Skip the PR/issue when compiling release notes label Apr 6, 2022
@lucasfcosta lucasfcosta force-pushed the remove-latency-warnings branch 2 times, most recently from de85161 to d22e81a Compare April 11, 2022 12:02
@lucasfcosta lucasfcosta force-pushed the remove-latency-warnings branch from d22e81a to 179997e Compare April 11, 2022 16:02
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Test Failures

  • [job] [logs] Default CI Group #10 / Actions and Triggers app Rule Details Header should reenable a disabled the rule
  • [job] [logs] OSS CI Group #11 / visualize app visualize ciGroup11 visual builder Time Series basics Clicking on the chart should create a filter for series with multiple split by terms fields one of which has formatting

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
uptime 777.5KB 777.2KB -249.0B

History

  • 💛 Build #37240 was flaky d22e81a7fd3ff16f49bb593cefcee2d0d0126b02
  • 💔 Build #37212 failed de85161c86d9dd96ae0389f3ba091c7d9510ef15
  • 💔 Build #36491 failed f1f943ec497a1a043765d9327ac2c2038fe10646

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

Copy link
Contributor

@shahzad31 shahzad31 left a comment

Choose a reason for hiding this comment

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

LGTM, Works as expcted !!

@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.2

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

Questions ?

Please refer to the Backport tool documentation

jloleysens added a commit to jloleysens/kibana that referenced this pull request Apr 13, 2022
…disable-server-side

* 'main' of github.com:elastic/kibana: (35 commits)
  [Uptime] remove latency limit warnings when using monitor management (elastic#129597)
  [Security Solution] [ReponseOps] Executes Cases Cypress test when there is a change on cases plugin (elastic#129992)
  Paramaterized Discover tests (elastic#129684)
  [Security Solution][Investigations] - Minor bug fixes (elastic#130054)
  [DOCS} Adds technical preview to Lens annotations (elastic#130058)
  [Security solution] [Endpoint] Revisit blocklist wrong labels (elastic#128773)
  [Security Solutions] Adds API docs for value lists (elastic#129962)
  [CI] Move jest tests to spot instances, and fix spot retries in PRs (elastic#130045)
  chore(NA): upgrades rules_node_js to v5.4.0 (elastic#130051)
  [SecuritySolution] Remove the cell hovers actions for agent status (elastic#130042)
  Upgrade RxJS to 7 (elastic#129087)
  [SecuritySolution] Clean up CaseContext (elastic#130036)
  Revert "chore(NA): upgrades rules_node_js to v5.4.0 (elastic#130021)"
  Use RuleDataReader to query for threshold signal history (elastic#129763)
  Remove securityRulesCancelEnabled setting and set shorter default timeouts (elastic#129769)
  Upgrade EUI to v54.0.0 (elastic#129653)
  [Security Solution] More Ransomware exceptionable fields (elastic#130039)
  Add e2e for the apm integration policy form (elastic#129860)
  chore(NA): upgrades rules_node_js to v5.4.0 (elastic#130021)
  [ML] Fix Single Metric Viewer chart failing to load if no points during calendar event (elastic#130000)
  ...

# Conflicts:
#	x-pack/plugins/screenshotting/server/screenshots/index.test.ts
jloleysens added a commit to jloleysens/kibana that referenced this pull request Apr 13, 2022
…rint-media-attempt-2

* 'main' of github.com:elastic/kibana: (75 commits)
  [Lens] Hide disabled toolbar entries (elastic#129994)
  Fix explore tables don't display data when a global filter is applied (elastic#130024)
  [Console] Add option to disable keyboard shortcuts (elastic#128887)
  [Discover] Update refreshOnClick flaky test (elastic#130001)
  [Uptime] remove latency limit warnings when using monitor management (elastic#129597)
  [Security Solution] [ReponseOps] Executes Cases Cypress test when there is a change on cases plugin (elastic#129992)
  Paramaterized Discover tests (elastic#129684)
  [Security Solution][Investigations] - Minor bug fixes (elastic#130054)
  [DOCS} Adds technical preview to Lens annotations (elastic#130058)
  [Security solution] [Endpoint] Revisit blocklist wrong labels (elastic#128773)
  [Security Solutions] Adds API docs for value lists (elastic#129962)
  [CI] Move jest tests to spot instances, and fix spot retries in PRs (elastic#130045)
  chore(NA): upgrades rules_node_js to v5.4.0 (elastic#130051)
  [SecuritySolution] Remove the cell hovers actions for agent status (elastic#130042)
  Upgrade RxJS to 7 (elastic#129087)
  [SecuritySolution] Clean up CaseContext (elastic#130036)
  Revert "chore(NA): upgrades rules_node_js to v5.4.0 (elastic#130021)"
  Use RuleDataReader to query for threshold signal history (elastic#129763)
  Remove securityRulesCancelEnabled setting and set shorter default timeouts (elastic#129769)
  Upgrade EUI to v54.0.0 (elastic#129653)
  ...

# Conflicts:
#	x-pack/plugins/screenshotting/server/formats/pdf/index.ts
kibanamachine added a commit that referenced this pull request Apr 13, 2022
…129597) (#130082)

(cherry picked from commit 1a6b234)

Co-authored-by: Lucas F. da Costa <lucas.costa@elastic.co>
@dominiqueclarke
Copy link
Contributor

Tested with 8.2 branch using

No warnings for latecy.

Screen Shot 2022-04-13 at 4 51 11 PM

Screen Shot 2022-04-13 at 4 51 05 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed 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.2.0 v8.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants