Relating synthetic monitor with apm

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)

  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)

I hope you can help me. Thanks