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] fix script_type for monitor management telemetry #131855

Conversation

dominiqueclarke
Copy link
Contributor

@dominiqueclarke dominiqueclarke commented May 9, 2022

Summary

Fixes Monitor Management telemetry by adding the appropriate script_type to the request body for browser monitors.

Testing

The easiest way to test this is to add a console log here

console.warn('ndjson', ndjson);

Testing inline monitors

  1. Create an inline browser monitor in monitor management
  2. Navigate to Kibana logs. Wait for the telemetry event to fire after about 30 seconds. Confirm that script_type is inline (You'll see two events each time)
  3. Edit the same inline browser monitor.
  4. Navigate to Kibana logs. Wait for the telemetry event to fire after about 30 seconds. Confirm that script_type is inline
  5. Delete the same inline browser monitor
  6. Navigate to Kibana logs. Wait for the telemetry event to fire after about 30 seconds. Confirm that script_type is inline

Testing recorder monitors

  1. Create a recorder browser monitor in monitor management by uploading this file: https://github.com/elastic/synthetics/blob/main/examples/inline/short.js
  2. Navigate to Kibana logs. Wait for the telemetry event to fire after about 30 seconds. Confirm that script_type is recorder (You'll see two events each time)
  3. Edit the same recorder browser monitor.
  4. Navigate to Kibana logs. Wait for the telemetry event to fire after about 30 seconds. Confirm that script_type is recorder
  5. Delete the same recorder browser monitor
  6. Navigate to Kibana logs. Wait for the telemetry event to fire after about 30 seconds. Confirm that script_type is recorder
    Delete any items that are not applicable to this PR.

@dominiqueclarke dominiqueclarke force-pushed the fix/synthetics-script-type-telemetry branch from 804e977 to 5fa8d3e Compare May 10, 2022 13:50
@dominiqueclarke dominiqueclarke added release_note:skip Skip the PR/issue when compiling release notes auto-backport Deprecated - use backport:version if exact versions are needed v8.3.0 v8.2.1 Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability labels May 10, 2022
@dominiqueclarke dominiqueclarke marked this pull request as ready for review May 10, 2022 13:56
@dominiqueclarke dominiqueclarke requested a review from a team as a code owner May 10, 2022 13:56
@elasticmachine
Copy link
Contributor

Pinging @elastic/uptime (Team:uptime)

@dominiqueclarke dominiqueclarke changed the title synthetics - fix script_type for monitor management telemetry [Synthetics] fix script_type for monitor management telemetry May 10, 2022
@shahzad31
Copy link
Contributor

@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.

Work as expected LGTM !!

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

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

@dominiqueclarke dominiqueclarke merged commit 94b894a into elastic:main May 12, 2022
@dominiqueclarke dominiqueclarke deleted the fix/synthetics-script-type-telemetry branch May 12, 2022 12:08
kibanamachine pushed a commit that referenced this pull request May 12, 2022
* synthetics - fix script_type for monitor management telemetry

* adjust tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 94b894a)
@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

kibanamachine added a commit that referenced this pull request May 12, 2022
… (#132124)

* synthetics - fix script_type for monitor management telemetry

* adjust tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 94b894a)

Co-authored-by: Dominique Clarke <dominique.clarke@elastic.co>
@awahab07 awahab07 self-assigned this Jun 7, 2022
@awahab07
Copy link
Contributor

awahab07 commented Jun 7, 2022

Post FF Testing

  • Correctly marks inline and recorder monitor script types while generate telemetry events.

@awahab07 awahab07 removed their assignment Jun 7, 2022
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 release_note:skip Skip the PR/issue when compiling release notes Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v8.2.1 v8.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants