# Monitor.use({ options

**URL:** <https://discuss.elastic.co/t/monitor-use-options/348415>\
**Category:** Synthetics\
**Created:** [December 1, 2023, 9:57am UTC](https://discuss.elastic.co/t/monitor-use-options/348415 "2023-12-01T09:57:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![linuschewpet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/linuschewpet/32/128391_2.png) [@linuschewpet](https://discuss.elastic.co/u/linuschewpet)\
**Post date:** [December 1, 2023, 9:57am UTC](https://discuss.elastic.co/t/monitor-use-options/348415/1 "2023-12-01T09:57:07Z")

</div>

```auto
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.

---

<div class="post-metadata">

**Author:** ![emilioalvap](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/emilioalvap/32/99310_2.png) [@emilioalvap](https://discuss.elastic.co/u/emilioalvap)\
**Post date:** [December 1, 2023, 2:58pm UTC](https://discuss.elastic.co/t/monitor-use-options/348415/2 "2023-12-01T14:58:36Z")

</div>

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:

```auto
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!

---

<div class="post-metadata">

**Author:** ![linuschewpet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/linuschewpet/32/128391_2.png) [@linuschewpet](https://discuss.elastic.co/u/linuschewpet)\
**Post date:** [December 3, 2023, 10:30am UTC](https://discuss.elastic.co/t/monitor-use-options/348415/3 "2023-12-03T10:30:08Z")

</div>

Thanks @emilioalvap

just putting this link here for anyone to view.

[synthetics/src/dsl/monitor.ts at main · elastic/synthetics (github.com)](https://github.com/elastic/synthetics/blob/main/src/dsl/monitor.ts)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 31, 2023, 10:30am UTC](https://discuss.elastic.co/t/monitor-use-options/348415/4 "2023-12-31T10:30:43Z")

</div>

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