By default it appears that standard http calls such as the simple example below log the Authorization header and are visible in the logs section of the dashboard.
The logs include source=http-debug.
This appears to be the default behaviour.
Is there any way of turning off http debugging specifically in the synthetic monitor scripts.
Using
export const options = {
httpDebug: ‘none’
}
does not work. The documentation implies httpDebug:’full’ is not the default however it does appear to me to be.in the context of synthetics.
Note - I appreciate in the example below you could use k6/secrets - however that does not resolve the problem as in subsequent calls the auth token generated also appears in the logs.for subsequent requests.
Thanks
const authTokenResponse = http.post(ctp_auth_url, `grant_type=client_credentials&scope=${ctp_scopes}`, {
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Authorization': `Basic ${encoding.b64encode(`${ctp_client_id}:${ctp_client_secret}`)}`,
},
});
(subsequent request - can’t use k6/secrets - authorization header appears in logs)
const req = http.get(url,{
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${access_token}`,
}
})