synthetics

Synthetic Monitoring with Real Browsers

MIT License

Downloads
107.3K
Stars
65
Committers
22

Bot releases are visible (Hide)

synthetics - v1.0.0

Published by vigneshshanmugam over 1 year ago

Features

  • Lightweight monitors filtering will be applied based on the provdied --pattern, --tags, --match flags same as their browser journey counterparts #761
  • Synthetics codegen is updated with the latest playwright API enhancements from the recorder #757

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

synthetics - v1.0.0-beta.46

Published by vigneshshanmugam over 1 year ago

Breaking Changes

  • Network throttling via Chrome devtools emulation is deprecated and no longer gets applied to all any synthetic tests, If users have explicitly configured throttling in their tests, the settings will not be applied and might see the page loads quicker than before.
    Throttling will be re-enabled at later point, See the throttling docs for more details.

Full Changelog: https://github.com/elastic/synthetics/compare/v1.0.0-beta.45...v1.0.0-beta.46

synthetics - v1.0.0-beta.45

Published by vigneshshanmugam over 1 year ago

Features

  • Synthetics now waits for 50 seconds by default for all navigations and actions - Previously it was set to 30 seconds. This can be over-riden for all the tests by passing navigationTimeout and actionTimeout via PlaywrightOptions configuration https://github.com/elastic/synthetics/pull/742
playwrightOptions: {
  navigationTimeout: 60000, // 60 seconds
  actionTimeout: 10000 // 10 seconds
}

Existing synthetics journeys that have a explicit timeout on the locator and other playwright API's will not be affected.

await page.goto("url", { timeout: 1000}) // not affected
await page.locator(".test", {timeout: 1000}) // not affected
  • Capture network information for all requests when at least the first byte data is received. This helps in scenarios where the response was streamed and the test itself was timed out waiting for the load or other events https://github.com/elastic/synthetics/pull/747

Bug Fixes

Full Changelog: https://github.com/elastic/synthetics/compare/v1.0.0-beta.44...v1.0.0-beta.45

synthetics - v1.0.0-beta.44

Published by vigneshshanmugam over 1 year ago

Features

  • Consolidate monitor schedule for both Lighweight and Browser monitor when using push command #724

Bug Fixes

  • Round off to the nearest schedule for lighweight monitors when running push command #732
  • Capture trace metrics including web-vitals for failed steps #739

Note: Playwright version is upgraded to v1.32.3

Full Changelog: https://github.com/elastic/synthetics/compare/v1.0.0-beta.43...v1.0.0-beta.44

synthetics - v1.0.0-beta.43

Published by vigneshshanmugam over 1 year ago

Bug Fixes

  • Avoid hanging on capturing network data #719
  • Drop network events once test runs to completion #720

Full Changelog: https://github.com/elastic/synthetics/compare/v1.0.0-beta.42...v1.0.0-beta.43

synthetics - v1.0.0-beta.42

Published by vigneshshanmugam over 1 year ago

Features

  • Add support for enabling/disabling alerts for monitors #713

Bug Fixes

  • Ignore recursively searching for yml files inside node_modules directory when pushing monitors #714

Full Changelog: https://github.com/elastic/synthetics/compare/v1.0.0-beta.41...v1.0.0-beta.42

synthetics - v1.0.0-beta.41

Published by vigneshshanmugam over 1 year ago

Features

  • Add support for passing custom data-test-id via PlaywrightOptions, this would help in the tests for locating the element via the custom attributes via page.getByTestId #706
  • Update Playwright library to version 1.31.1

Bug Fixes

  • Add proper monitor field heartbeat.monitors to lightweight scaffolding template #696
  • Reword the --pattern option when help command is run #710
  • Require node version >= 18.12.0 for running synthetics tests #708

Full Changelog: https://github.com/elastic/synthetics/compare/v1.0.0-beta.40...v1.0.0-beta.41

synthetics - v1.0.0-beta.40

Published by vigneshshanmugam almost 2 years ago

Features

  • Move from ts-node to esbuild for transforming the TypeScript files at runtime. This includes journeys, synthetics config files which are .ts extensions and transform the files at runtime along with full source-map support. One of the advantage this provides is the ability to use the same esbuild API for both transpiling and bundling of the monitors #687
  • Use new Kibana Bulk API endpoints for pushing project monitors #649
  • Allow project based monitors to disable throttling via Synthetics config or by setting throttling: false #690
  • Prompt users before overriding Synthetics config file when init command is called multiple times inside a Synthetics project #688

Bug fixes

  • Update monitor in Kibana when when monitor content or config changes by generating unique hash #683
  • Handle when users throw error like objects inside journey #694

Full Changelog: https://github.com/elastic/synthetics/compare/v1.0.0-beta.39...v1.0.0-beta.40

synthetics - v1.0.0-beta.39

Published by vigneshshanmugam almost 2 years ago

Features

  • Improve the performance of push command when monitors are created or updated by chunking the monitors #666
  • Add an example lightweight monitor yaml file when a new synthetics project is created via init command #650

Bug Fixes

  • Parse varying NDJSON chunked responses sizes from Kibana when the API endpoint is behind a proxy #665
  • Skip adding empty values for locations when creating new synthetics project using init command #658

Full Changelog: https://github.com/elastic/synthetics/compare/v1.0.0-beta.38...v1.0.0-beta.39

synthetics - v1.0.0-beta.38

Published by vigneshshanmugam almost 2 years ago

Features

  • Improve the validation of project monitor schedule for both browser and lightweight monitors. Error would be thrown if users would configure monitor schedule that are not supported. For lightweight monitors, we would save the schedule to the nearest supported schedule frequency #622

    Current allowed schedule values are 1, 3, 5, 10, 15, 30, 60 minutes respectively.

  • Improve the push command experience by showing the monitor management URL link once the push has been completed successfully #637

Bug fixes

  • Pick the correct loader when bundling TypeScript or JavaScript journey files during push command #626

Browser version

Playwright version has been updated to 1.27.1

Full Changelog: https://github.com/elastic/synthetics/compare/v1.0.0-beta.37...v1.0.0-beta.38

synthetics - v1.0.0-beta.37

Published by vigneshshanmugam about 2 years ago

Bug Fixes

  • fix an issue in newer versions of sharp by creating separate sharp instance to produce screenshots data #623

Full Changelog: https://github.com/elastic/synthetics/compare/v1.0.0-beta.36...v1.0.0-beta.37

synthetics - v1.0.0-beta.36

Published by vigneshshanmugam about 2 years ago

Features

Project based lightweight monitors

In addition to pushing Project based browser monitors to Monitor management UI, the agent now supports pushing existing lightweight monitors directly from the heartbeat.yml files #542. Users can directly import the existing heartbeat.yml files in to their Synthetics project and configure the required project settings (Kibana host, auth key, locations, etc.) and run the push command.

  1. Create a new Synthetics project using npx @elastic/synthetics init <dir-name> and configure the project related settings.
  2. Copy the existing heartbeat.yml files in to the synthetics project directory. Example
   // heartbeat.yml example
  - type: http
    enabled: true
    id: my-monitor
    name: My Monitor
    urls: ["http://localhost:9200"]
    schedule: @every 10m
    locations: ["singapore"]
    private_locations: ["private-1"]
    timeout: 16s
  1. Override the schedule, locations and private locations for specific monitors. Otherwise the defaults would be picked from synthetics.config.ts files.
  2. Run the push command SYNTHETICS_API_KEY=<key> npm run push

Browser version

  • Playwright version has been updated to 1.26.0, this means the tests will be run on Google Chrome/106.0.5249.30.

Bug fixes

  • Transfer size of network requests now includes both the response header and body sizes #615

Full Changelog: https://github.com/elastic/synthetics/compare/v1.0.0-beta.35...v1.0.0-beta.36

synthetics - v1.0.0-beta.35

Published by vigneshshanmugam about 2 years ago

Features

  • Agent now prompts a warning question in interactive mode when users attempt to run push command without any active monitors which would nuke an entire project #598
  • Users can suppress all prompt questions when running push command with --yes or -y flag #602
    SYNTHETICS_API_KEY="key" npx @ealstic/synthetics push --yes
    

Full Changelog: https://github.com/elastic/synthetics/compare/v1.0.0-beta.34...v1.0.0-beta.35

synthetics - v1.0.0-beta.34

Published by vigneshshanmugam about 2 years ago

Features

  • Synthetics push command now supports bundling external packages from node_modules folder for browser monitors, users can now use external packages utility packages like lodash, moment.js, etc, in their synthetics scripts and push them instantaneously to Kibana. https://github.com/elastic/synthetics/pull/580

    Example journey code below using an external package is-positive from NPM.

    // test.journey.ts
    import { journey, step, monitor, expect } from '@elastic/synthetics';
    import isPositive from 'is-positive';
    
    journey('bundle test', ({ page, params }) => {
      step('check if positive', () => {
        expect(isPositive(4)).toBe(true);
      });
    });
    

    If you run npm run push inside the synthetics project, we would bundle the whole journey file along with the package is-positive to make the experience smooth. However, there are a few caveats when pushing external modules.

    1. Packages that use native bindings will not work.
    2. Users cannot push bundles that are more than 800 Kilobytes.
  • Introduce configuring project monitor settings in the Synthetics config file https://github.com/elastic/synthetics/pull/592. Comes in handy when running push command, users would be able to configure project-related settings like projectId, kibana host, and schedule and save them for successive runs.

  • Support the SYNTHETICS_API_KEY env variable for Kibana authentication when pushing monitors to Kibana https://github.com/elastic/synthetics/pull/588

Full Changelog: https://github.com/elastic/synthetics/compare/v1.0.0-beta.33...v1.0.0-beta.34

synthetics - v1.0.0-beta.33

Published by vigneshshanmugam about 2 years ago

Bug Fixes

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

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