Filtering out rate limited requests using dynamic tags

I have my scenarios running and logging to Influx DB. The issue I am having is this request is dependent on external APIs and occasionally we get rate limited. I don’t want requests where this happened to be included in my dashboards showing http_req_duration but they are still in there. Cases where this happens still return 200 as other aspects of their request may have worked so it is not appropriate to return an error code. Instead we include a warning in our response.

I have a check for this but that is logged in a separate measurement and I can’t figure how to disgard the http requests where the check failed from the duration measurement.

Is it possible to add a dynamic tag or something to indicate a failure?

No, you can’t add a tag to http_req_duration measurements based on whether the response body contains something, sorry.

I’d suggest that you instead emit a custom Trend metric called my_http_req_duration (or something like that) and .add() to it the response.timings.duration value only of the requests that you want to track. Then simply ignore http_req_duration and track only my_http_req_duration.

Thanks, I’ll try that.