Monitor.use({ options

const { journey, step, expect, monitor } = require('@elastic/synthetics');
journey('App1', async ({ page, context }) => {
  monitor.use({
    id: 'App1',
    schedule: 30,
    tags: ['App1'],
    //service: ['App1'],
  });

Is there a full documentation that list out the options available for monitor.use?

I am trying to add a APM Service Name but am unsure what is the righ properties.

Hi @linuschewpet,

Thanks for your interest in synthetics! While there's no specific documentation about the monitor.use() interface, we usually rely on IDE auto-completion together with TS types:

export type MonitorConfig = {
  id?: string;
  name?: string;
  type?: string;
  tags?: string[];
  schedule?: typeof ALLOWED_SCHEDULES[number];
  enabled?: boolean;
  locations?: SyntheticsLocationsType[];
  privateLocations?: string[];
  /**
   * @deprecated This option is ignored.
   * Network throttling via chrome devtools is ignored at the moment.
   * See https://github.com/elastic/synthetics/blob/main/docs/throttling.md for more details.
   */
  throttling?: boolean | ThrottlingOptions;
  screenshot?: ScreenshotOptions;
  params?: Params;
  playwrightOptions?: PlaywrightOptions;
  alert?: AlertConfig;
  /**
   * By default, the monitor will be retested on failure
   */
  retestOnFailure?: boolean;
};

We will consider improving our documentation for future releases.

Hope that helps!

1 Like

Thanks @emilioalvap

just putting this link here for anyone to view.

synthetics/src/dsl/monitor.ts at main · elastic/synthetics (github.com)

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.