Skip to content

Releases: elastic/synthetics

v1.0.0-beta.32

24 Aug 22:31
Compare
Choose a tag to compare

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: v1.0.0-beta.31...v1.0.0-beta.32

v1.0.0-beta.31

27 Jul 15:39
Compare
Choose a tag to compare

Features

  • Expose request context as part of the Journey if you want to make calls to the
    HTTP API of your application. #555

Bug Fixes

  • Push command fails to push the monitors in windows platform #553

Full Changelog: v1.0.0-beta.30...v1.0.0-beta.31

v1.0.0-beta.30

28 Jun 16:48
Compare
Choose a tag to compare

Bug Fixes

  • fix: use fixed playwright version to avoid running in to dependency warnings #540

Full Changelog: v1.0.0-beta.29...v1.0.0-beta.30

v1.0.0-beta.29

22 Jun 14:22
Compare
Choose a tag to compare

Bug fixes

  • Setup github workflow template correctly #529
  • Stop pushing monitors on bundle errors #530
  • Delete stale monitors by default on push command #534
  • Allow controlling timeouts via actions #532
  • Remove trailing slash from Kibana host #536

Full Changelog: v1.0.0-beta.28...v1.0.0-beta.29

v1.0.0-beta.28

13 Jun 17:28
Compare
Choose a tag to compare

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: v1.0.0-beta.27...v1.0.0-beta.28

v1.0.0-beta.27

03 Jun 15:43
Compare
Choose a tag to compare

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

v1.0.0-beta.26

20 May 23:26
Compare
Choose a tag to compare

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,
});

v1.0.0-beta.25

12 Apr 22:19
Compare
Choose a tag to compare

Features

  • Use network events emitted from playwright browser context, This would allow us to capture network requests that are part of popups and other page objects by @vigneshshanmugam in #488

Full Changelog: v1.0.0-beta.24...v1.0.0-beta.25

v1.0.0-beta.24

10 Apr 17:58
Compare
Choose a tag to compare

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. elastic/beats#29681

Full Changelog: v1.0.0-beta.23...v1.0.0-beta.24

v1.0.0-beta.23

25 Mar 18:05
Compare
Choose a tag to compare

Features

Full Changelog: v1.0.0-beta.22...v1.0.0-beta.23