support custom env. By default we collect process.env. But you can define it's own env variables to send by pass in your config next option:
// utils.ts
export default function mapEnvs(envs: Record<string, string|undefined>){
// do smth with envs: hide, mask, whatever.
return {}
}
// playwright.config.ts
export default defineConfig({
// ...
reporter: [
['playwright-prometheus-remote-write-reporter', {
// env: {} // empty env variables will be send
// env: {key: 'value'} // key:value will be send to prometheus.
// env: undefined // same as set process.env. Send all envs in process
env: mapEnvs(process.env) // mapEnvs - you custom function to hide/mask some env variables
}]
],
// ...
})
After researching, I decided to implement my own.
Closes #8
support custom env. By default we collect
process.env
. But you can define it's own env variables to send by pass in your config next option: