Environment variables not working in lightweight monitor

My lightweight monitor runs in a docker container, where I configured an environment variable TEST_VARIABLE. I tried several ways to use this variable, but they all don't work.

Particularly the example [in the documentation] is not working. Also be aware, that the example does not follow the normal template with

export default env => {

I tried to reference the environment variable with process.env.TEST_VARIABLE from within the synthetics.config.ts which did not work.

Also I tried referencing the variable directly in my monitor with $TEST_VARIABLE or "$TEST_VARIABLE" and it did not work.

It would be valuable to get some information on this. Will anyone at Elastic look into this?

@masapr which version of kibana, elastic agent and synthetics agent are you using?

Everything is on 8.13.4 (Elastic, Kibana, synthetic agent)

any new information on this?