# Relating synthetic monitor with apm

**URL:** https://discuss.elastic.co/t/relating-synthetic-monitor-with-apm/369246
**Category:** Elastic Observability
**Created:** [October 22, 2024, 10:22pm UTC](https://discuss.elastic.co/t/relating-synthetic-monitor-with-apm/369246 "2024-10-22T22:22:43Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Cristian\_Pereyra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cristian_pereyra/32/126779_2.png) [@Cristian\_Pereyra](https://discuss.elastic.co/u/Cristian_Pereyra)
#### Post date: [October 22, 2024, 10:22pm UTC](https://discuss.elastic.co/t/relating-synthetic-monitor-with-apm/369246/1 "2024-10-22T22:22:43Z")

</div>

Hello everyone!

I'm using synthetic monitor with CLI creating projects. It works fine for me.

My goal is to relate the synthetic monitor and uptime with Apm:

- synthetic monitor: front
- uptime: back
- Apm: microservice

With uptime I already got it. I had to add the _fields_ statement to each monitor making it match the service.name of the microservice that sent information to apm.  
(I do it this way because it's more flexible to add fields)

```auto
  fields_under_root: true
  fields: 
    service:
      name: "<name>"
      environment: "<environment>"

```

Now, with synthetic monitor I didn't find in the documentation that you can add extra fields.

My question is, can you add information to the synthetic monitor while using the CLI and relate it to apm?  
(if I create the synthetic monitor from the Synthetics app -kibana ui- it allows me to add that info)

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/f/8f81664549dab358345929148f14914464d5229e.png)

I hope you can help me. Thanks
