Exclude specific requests from metric collection

Hey there,

I’m doing some health check requests in the setup stage since the api might not have been started entirely when the test starts running. Can I exclude those requests somehow from metric collection? I use http.get to make the requests.

thanks in advance :slight_smile:
Jannik

Hi,

unfortunately there’s no way of excluding metrics per request, but if you tag them then you could exclude metrics with those tags when processing the results in whatever backend or output you used, e.g. by using an InfluxQL or jq filter.

Though in fairness, this might be a good feature to support: pass an exclude flag to the request params or similar.

Hope this helps,

Ivan

Hey,

I figured as much. It would indeed be a great feature to support :slight_smile:

I’ll try tagging.

Thanks,
Jannik

Follow https://github.com/loadimpact/k6/issues/1321 for updates on when something like this would be done