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

Heartbeat: set duration to zero for syntax errors #30227

Merged
merged 2 commits into from
Feb 11, 2022

Conversation

vigneshshanmugam
Copy link
Member

  • When there are syntax errors in the monitor script, the journey/start never fires as the Synthetics runner cannot register the journeys and node runs to completion with exit status 1.
  • In these cases, determining the duration between start/end event would be tricky and since the journeys never run in the first place, Its good to set the duration to 0 instead of setting false positive values.
  • Added extensive test cases for summary event creation for various scenarios
heartbeat.run_once: true
# Configure monitors inline
heartbeat.monitors:
  - type: browser
    id: my-monitor
    name: My Monitor
    source:
      inline:
        script: step("load homepage", async () => {);
    schedule: "@every 1m"

output.console: ~
``

@vigneshshanmugam vigneshshanmugam added Team:obs-ds-hosted-services Label for the Observability Hosted Services team backport-v8.0.0 Automated backport with mergify v8.1.0 backport-v8.1.0 Automated backport with mergify backport-7.17 Automated backport to the 7.17 branch with mergify labels Feb 4, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/uptime (Team:Uptime)

@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Feb 4, 2022
@elasticmachine
Copy link
Collaborator

elasticmachine commented Feb 4, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-02-11T19:20:39.842+0000

  • Duration: 48 min 17 sec

Test stats 🧪

Test Results
Failed 0
Passed 125
Skipped 0
Total 125

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

Copy link
Contributor

@andrewvc andrewvc left a comment

Choose a reason for hiding this comment

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

LGTM (also verified the behavior works well on kibana)

@paulb-elastic
Copy link
Contributor

Discussed in Tech Sync to consider having this as null rather than 0 (with a view on if that's supported in the UI)
/cc @vigneshshanmugam

Copy link
Contributor

@andrewvc andrewvc left a comment

Choose a reason for hiding this comment

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

LGTM

@vigneshshanmugam vigneshshanmugam merged commit 06c810c into elastic:main Feb 11, 2022
mergify bot pushed a commit that referenced this pull request Feb 11, 2022
* Heartbeat: set duration to 0 for syntax errors

* set duration to null

(cherry picked from commit 06c810c)
mergify bot pushed a commit that referenced this pull request Feb 11, 2022
* Heartbeat: set duration to 0 for syntax errors

* set duration to null

(cherry picked from commit 06c810c)
mergify bot pushed a commit that referenced this pull request Feb 11, 2022
* Heartbeat: set duration to 0 for syntax errors

* set duration to null

(cherry picked from commit 06c810c)
vigneshshanmugam added a commit that referenced this pull request Feb 11, 2022
* Heartbeat: set duration to 0 for syntax errors

* set duration to null

(cherry picked from commit 06c810c)

Co-authored-by: Vignesh Shanmugam <[email protected]>
vigneshshanmugam added a commit that referenced this pull request Feb 11, 2022
* Heartbeat: set duration to 0 for syntax errors

* set duration to null

(cherry picked from commit 06c810c)

Co-authored-by: Vignesh Shanmugam <[email protected]>
vigneshshanmugam added a commit that referenced this pull request Feb 11, 2022
* Heartbeat: set duration to 0 for syntax errors

* set duration to null

(cherry picked from commit 06c810c)

Co-authored-by: Vignesh Shanmugam <[email protected]>
v1v added a commit to v1v/beats that referenced this pull request Feb 21, 2022
…into feature/use-with-kind-k8s-env

* 'feature/use-with-kind-k8s-env' of github.com:v1v/beats: (52 commits)
  ci: home is declared within withBeatsEnv
  ci: use withKindEnv step
  ci: use getBranchesFromAliases and support next-patch-8 (elastic#30400)
  Update fields.yml (elastic#29609)
  Heartbeat: fix browser metrics and trace mappings (elastic#30258)
  Apply light edits to 8.0 changelog (elastic#30351)
  packetbeat/beater: make sure Npcap installation runs before interfaces are needed (elastic#30396)
  Add a ring-buffer reporter to libbeat (elastic#28750)
  Osquerybeat: Add install verification for osquerybeat (elastic#30388)
  update windows matrix support (elastic#30373)
  Refactor of metricbeat process-gathering metrics and system/process (elastic#30076)
  adjust next changelog wording (elastic#30371)
  [Metricbeat] azure: move event report into loop validDim loop (elastic#29945)
  fix: report GitHub Check before the cache (elastic#30372)
  Add support for non-unique keys in Kafka output headers (elastic#30369)
  ci: 6 major branch reached EOL (elastic#30357)
  reduce Elastic Agent shut down time by stopping processes concurrently (elastic#29650)
  [Filebeat] Add message to register encode/decode debug logs (elastic#30271)
  [libbeat] kafka message header support (elastic#29940)
  Heartbeat: set duration to zero for syntax errors (elastic#30227)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-7.17 Automated backport to the 7.17 branch with mergify backport-v8.0.0 Automated backport with mergify backport-v8.1.0 Automated backport with mergify bug Team:obs-ds-hosted-services Label for the Observability Hosted Services team v8.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants