Synthetic Monitoring with Real Browsers
MIT License
Bot releases are hidden (Show)
Published by vigneshshanmugam about 2 years ago
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 #566npx @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>
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>
Full Changelog: https://github.com/elastic/synthetics/compare/v1.0.0-beta.31...v1.0.0-beta.32
Published by vigneshshanmugam about 2 years ago
request
context as part of the Journey if you want to make calls to theFull Changelog: https://github.com/elastic/synthetics/compare/v1.0.0-beta.30...v1.0.0-beta.31
Published by vigneshshanmugam over 2 years ago
Full Changelog: https://github.com/elastic/synthetics/compare/v1.0.0-beta.29...v1.0.0-beta.30
Published by lucasfcosta over 2 years ago
Full Changelog: https://github.com/elastic/synthetics/compare/v1.0.0-beta.28...v1.0.0-beta.29
Published by lucasfcosta over 2 years ago
--match
, --pattern
and --tags
flags to filter which journeys to push #523init
command now generates more detailed examples, and includes documentation reference #524source-map-support
so that we use correct filepaths when bundling and pushing monitors #520Full Changelog: https://github.com/elastic/synthetics/compare/v1.0.0-beta.27...v1.0.0-beta.28
Published by vigneshshanmugam over 2 years ago
npx @elastic/synthetics init <dir>
command, allows users to choose default test location and schedule for the monitors to be pushed to Kibana #508.gitignore
files for scaffolding instead of managing under assets #510Published by vigneshshanmugam over 2 years ago
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.
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');
});
});
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,
});
Published by vigneshshanmugam over 2 years ago
Full Changelog: https://github.com/elastic/synthetics/compare/v1.0.0-beta.24...v1.0.0-beta.25
Published by vigneshshanmugam over 2 years ago
1.20.1
to address issues related1.20.1
, Synthetics agent officallyFull Changelog: https://github.com/elastic/synthetics/compare/v1.0.0-beta.23...v1.0.0-beta.24
Published by vigneshshanmugam over 2 years ago
Action
type from the Synthetics formatter by @justinkambic in https://github.com/elastic/synthetics/pull/454
Full Changelog: https://github.com/elastic/synthetics/compare/v1.0.0-beta.22...v1.0.0-beta.23
Published by vigneshshanmugam over 2 years ago
Full Changelog: https://github.com/elastic/synthetics/compare/v1.0.0-beta.21...v1.0.0-beta.22
Published by vigneshshanmugam over 2 years ago
Full Changelog: https://github.com/elastic/synthetics/compare/v1.0.0-beta.20...v1.0.0-beta.21
Published by vigneshshanmugam over 2 years ago
Full Changelog: https://github.com/elastic/synthetics/compare/v1.0.0-beta.19...v1.0.0-beta.20
Published by vigneshshanmugam over 2 years ago
journey/end
is written to file descriptor by flushing out theFull Changelog: https://github.com/elastic/synthetics/compare/v1.0.0-beta.18...v1.0.0-beta.19
Published by lucasfcosta almost 3 years ago
Full Changelog: https://github.com/elastic/synthetics/compare/v1.0.0-beta.17...v1.0.0-beta.18
Published by vigneshshanmugam almost 3 years ago
--params
instead #406
--playwright-options
CLI flag that lets user specify allsynthetics.config.js
file #405
journey/end
event reflects the time when the event happens insteadjourney/start
and journey/end
#409
Published by vigneshshanmugam about 3 years ago
Published by vigneshshanmugam about 3 years ago
--throttling '10d/2u/30l'
flag or--no-throttling
flag #284
Elastic/Synthetics
user-agent identifier to all networkPublished by vigneshshanmugam about 3 years ago
--suite-params
flag support to support Heartbeat 7.15 #379
Published by vigneshshanmugam about 3 years ago