synthetics

Synthetic Monitoring with Real Browsers

MIT License

Downloads
107.3K
Stars
65
Committers
22

Bot releases are hidden (Show)

synthetics - v1.0.0-beta.32

Published by vigneshshanmugam about 2 years ago

Features

  • Improve the scaffolding experience of init command by setting up a brand new synthetics project by automatically connecting to your Kibana instance. With this, creating synthetics monitors and pushing them to Kibana becomes a lot easier #566
npx @elastic/synthetics init [project]

cd <project> && SYNTHETICS_API_KEY=<api-key> npm run push

Setting up the project is a one time operation, Once the init command is done, Synthetics agent stores the project releated settings under project.json file. From then, users can push all the synthetics monitors by specifying just the authentication key. If users want to push the monitors under different Kibana instance, project, spaces etc. They can do so by passing the CLI options explicitly.

npx @elastic/synthetics --url <url> --project <name> --space <kibana-spaces>
  • Introduce a new CLI command locations to list all the available public and private locations for running synthetic monitoring across the globe.
// List all the available global locations managed by Elastic for running synthetics monitors
npx @elastic/synthetics locations


// List all managed locations as well as custom private locations
npx @elastic/synthetics locations --url <kibana-host> --auth <api-key>
  • Warns when users accidently trying to push same sets of monitors under different project name #566
  • Push command now can display progress in the terminal whenever monitors are created, updated and deleted along with errors #576

Bug Fixes

  • Report error when monitors with duplicate ids are pushed to Kibana #568
  • Allow CLI sub commands(push, locations, init) to receive common options #572
  • Bundled push monitor contents must be idempotent, this caused performance issues in the Kibana side when monitors were updated every time user ran the push command #579
  • Report warnings in the terminal when Kibana fails to delete stale monitors #565

Full Changelog: https://github.com/elastic/synthetics/compare/v1.0.0-beta.31...v1.0.0-beta.32

synthetics - v1.0.0-beta.31

Published by vigneshshanmugam about 2 years ago

Features

Bug Fixes

Full Changelog: https://github.com/elastic/synthetics/compare/v1.0.0-beta.30...v1.0.0-beta.31

synthetics - v1.0.0-beta.30

Published by vigneshshanmugam over 2 years ago

Bug Fixes

Full Changelog: https://github.com/elastic/synthetics/compare/v1.0.0-beta.29...v1.0.0-beta.30

synthetics - v1.0.0-beta.29

Published by lucasfcosta over 2 years ago

Bug fixes

Full Changelog: https://github.com/elastic/synthetics/compare/v1.0.0-beta.28...v1.0.0-beta.29

synthetics - v1.0.0-beta.28

Published by lucasfcosta over 2 years ago

Features

  • Now that push only supports configurations in the current working directory, it also allows users to use the --match, --pattern and --tags flags to filter which journeys to push #523
  • The init command now generates more detailed examples, and includes documentation reference #524

Bug fixes

  • Upgrade sharp version to avoid known vulnerabilities #519
  • Update source-map-support so that we use correct filepaths when bundling and pushing monitors #520

Full Changelog: https://github.com/elastic/synthetics/compare/v1.0.0-beta.27...v1.0.0-beta.28

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