synthetics

Synthetic Monitoring with Real Browsers

MIT License

Downloads
107.3K
Stars
65
Committers
22

Bot releases are visible (Hide)

synthetics - v1.0.0-beta.27

Published by vigneshshanmugam over 2 years ago

Features

  • Use Kibana Uptime APIKeys instead of Basic Auth for pushing monitors #512
  • Update all the available Synthetics test node locations #515
  • Interactive scaffolding using the npx @elastic/synthetics init <dir> command, allows users to choose default test location and schedule for the monitors to be pushed to Kibana #508

Bug fixes

  • Write .gitignore files for scaffolding instead of managing under assets #510
  • Preserve the original User-Agent string if the user configured the value and do not append 'Elastic/Synthetics' identifier #514
  • Override the PlaywrightOptions when configured via CLI and Synthetics config file #517
synthetics - v1.0.0-beta.26

Published by vigneshshanmugam over 2 years ago

Features

Scaffolding a Synthetics project

If you are new to Synthetics and want to quickly get started, you can scaffold the project using init command.

npx @elastic/synthetics init synthetics-project

Running the above command will install the synthetics agent and required dependencies. Will also create Synthetics configuration file and example journey files.

Push command and Monitor management

Manage the monitors in the Kibana monitor management UI (available from Elastic stack >= 8.3.0) using the new push command.

npx @elastic/synthetics push <path/to/journey-dir> --auth <api-key> --url <kibana-url> --project <id|name>

Running the above command will bundle all your local journey files and creates them in Kibana. This allows you to manage all the browser monitors from your local environment. Users can configure most of monitor related fields using the newly provided Monitor DSL.

import { journey, step, monitor, expect } from '@elastic/synthetics';

journey('My Example Journey', ({ page, params }) => {
  /**
   *  Only relevant for the push command to create monitors in Kibana
   */
  monitor.use({
    id: 'example-monitor',
    schedule: 10,
    throttling: {
      download: 10,
      upload: 5,
      latency: 100,
    },
  });
  step('launch application', async () => {
    await page.goto('https://example.com');
  });
});

Custom Reporter API

In addition to the built in reporters like default, json, junit, you can create a custom reporter using the new reporter API.

// reporter.ts
import { Reporter } from '@elastic/synthetics';

export class CustomReporter implements Reporter {
  onStart({ numJourneys }) {
    console.log(`Running ${numJourneys} journeys`);
  }
  onJourneyStart(journey) {
    console.log(`journey:start ${journey.name}`);
  }
  onJourneyEnd(journey) {
    console.log(`journey:end ${journey.name}`);
  }
  onEnd() {
    console.log('done');
  }
}

Now the reporter can be programmatically invoked via the run API

import { run } from '@elastic/synthetics';
import { CustomReporter } from './reporter';

const result = await run({
  reporter: CustomReporter,
});
synthetics - v1.0.0-beta.25

Published by vigneshshanmugam over 2 years ago

Features

Full Changelog: https://github.com/elastic/synthetics/compare/v1.0.0-beta.24...v1.0.0-beta.25

synthetics - v1.0.0-beta.24

Published by vigneshshanmugam over 2 years ago

Bug fixes

  • Update the playwright to version 1.20.1 to address issues related
    to core dumps #485

Breaking Changes

  • With the playwright update to version 1.20.1, Synthetics agent offically
    dropped support for CentOS and Heartbeat images will be distributed
    based on ubuntu 20.04 which is supported by Playwright as well. https://github.com/elastic/beats/pull/29681

Full Changelog: https://github.com/elastic/synthetics/compare/v1.0.0-beta.23...v1.0.0-beta.24

synthetics - v1.0.0-beta.23

Published by vigneshshanmugam over 2 years ago

Features

Full Changelog: https://github.com/elastic/synthetics/compare/v1.0.0-beta.22...v1.0.0-beta.23

synthetics - v1.0.0-beta.22

Published by vigneshshanmugam over 2 years ago

Bug fixes

Full Changelog: https://github.com/elastic/synthetics/compare/v1.0.0-beta.21...v1.0.0-beta.22

synthetics - v1.0.0-beta.21

Published by vigneshshanmugam over 2 years ago

Bug fixes

Full Changelog: https://github.com/elastic/synthetics/compare/v1.0.0-beta.20...v1.0.0-beta.21

synthetics - v1.0.0-beta.20

Published by vigneshshanmugam over 2 years ago

Bug fixes

  • Capture ReferenceError inside journeys #450

Full Changelog: https://github.com/elastic/synthetics/compare/v1.0.0-beta.19...v1.0.0-beta.20

synthetics - v1.0.0-beta.19

Published by vigneshshanmugam over 2 years ago

Bug fixes

  • Ensure journey/end is written to file descriptor by flushing out the
    last bytes in underlying stream #446
  • Debug logs should be logged to stdout instead of using the reporter
    file descriptor #423

Full Changelog: https://github.com/elastic/synthetics/compare/v1.0.0-beta.18...v1.0.0-beta.19

synthetics - v1.0.0-beta.18

Published by lucasfcosta almost 3 years ago

Bug Fixes

Full Changelog: https://github.com/elastic/synthetics/compare/v1.0.0-beta.17...v1.0.0-beta.18

synthetics - v1.0.0-beta.17

Published by vigneshshanmugam almost 3 years ago

Breaking Changes

  • Remove 'suiteparams' CLI option which was depreacted in the previous releases.
    Use --params instead #406

Features

  • Add support for --playwright-options CLI flag that lets user specify all
    browser and context options that Playwright supports in addition to passing it
    via synthetics.config.js file #405

Bug fixes

  • Timestamp of journey/end event reflects the time when the event happens instead
    of the time event was written to the output stream. This fixes issue when
    duration is calculated based on journey/start and journey/end #409
  • Rewrite screenshot timestamp based on when screenshot was taken instead of
    when the screenshot was processed and reconstructed #411
synthetics - v1.0.0-beta.16

Published by vigneshshanmugam about 3 years ago

Bug fixes

  • Revert to Playwright 1.14.0 as the newer versions of chromium
    breaks
    CentOS7. As a result of this revert, network events from other contexts like
    popups, iframes, tabs would not get captured #402
synthetics - v1.0.0-beta.15

Published by vigneshshanmugam about 3 years ago

v1.0.0-beta.15 (2021-10-14)

Breaking Changes

  • Drop support for Node 12 #397

Features

  • Enable trace events when invoked via Heartbeat, enables step level metrics
    like FCP, LCP and other performance metrics for all journeys #387
  • Use network events from playwright context which captures network requests
    from iframes, new tabs, etc. #372
  • Add default network emulation for journeys to be able to capture performance
    measurements more effectively. Default is 5Mbps download, 3Mbps Upload and 20ms latency.
    Users can control network throttling with --throttling '10d/2u/30l' flag or
    can disable the throttling via --no-throttling flag #284
  • Add Elastic/Synthetics user-agent identifier to all network
    requests. This enables users to analyze traffic from Elastic Synthetic
    monitoring platform #232
  • Introduce more assetion commands to formatter #385

Bug fixes

  • Account for page closing while capturing network events #398
synthetics - v1.0.0-beta.14

Published by vigneshshanmugam about 3 years ago

Bug fixes

  • Bring back --suite-params flag support to support Heartbeat 7.15 #379
synthetics - v1.0.0-beta.13

Published by vigneshshanmugam about 3 years ago

  • Add step level tracing API which enables capturing performance metrics (core
    web vitals) for each navigation as part of the journey #369
  • Capture all page errors and unhandled exceptions as part of the journeys #374
  • Introduce synthetics script generator which can transform the recorder actions
    into code #375
synthetics - v1.0.0-beta.12

Published by vigneshshanmugam about 3 years ago

Features

  • Add support for expect assertions for inline suites #365
  • Add ignore-https-errors to the CLI to ignore any HTTPS errors during
    navigation #361

Notable changes

  • Bump playwright to 1.14.0 #366
  • Bump Node.js version to 14 #364
synthetics - v1.0.0-beta.11

Published by vigneshshanmugam about 3 years ago

Breaking Changes

  • Drop support for Heartbeat 7.13
    #354

Features

  • Add quiet mode for Heartbeat via --quiet-exit-code and make
    it default for > 7.14 Heartbeat versions #357
synthetics - v1.0.0-beta.10

Published by vigneshshanmugam about 3 years ago

Bug fixes

  • Record correct screenshots for popups in new tabs
    and windows #353
  • Capture URL correctly for steps that involve navigations inside
    popups and windows #352
synthetics - v1.0.0-beta.9

Published by vigneshshanmugam over 3 years ago

Bug fixes

  • Populate journey id when its not explicitly specified #346
  • Remove Node.js 12 version restriction #343
synthetics - v1.0.0-beta.8

Published by vigneshshanmugam over 3 years ago

Bug fixes

  • Capture screenshots correctly when using device emulation #340