I’m new to k6. Just started sending metrics to Datadog. It all works fine EXCEPT the tags on ONE of my http requests do not appear in Datadog and I can’t figure out why. Here’s my code:
var params = {
headers: {
'user-id': randomUser.userID,
'Content-Type': 'application/json',
'Accept': 'application/json'
},
tags: {
endpoint: "post_schedules"
}
};
var response1 = http.post(thePath + '/schedules', thePayload, params);
params.tags.endpoint = "get_all_schedules";
var response2 = http.get(thePath + '/schedules', params);
params.tags.endpoint = "get_one_schedule";
var response3 = http.get(thePath + '/schedules/' + randomNamer, params);
params.tags.endpoint = "delete_one_schedule";
var response4 = http.del(thePath + '/schedules/' + randomNamer, params);
console.log(response4)
params.tags.endpoint = "get_all_feeds";
var response5 = http.get(thePath + '/feeds', params);
params.tags.endpoint = "get_one_feed";
var feedID = JSON.parse(response5.body)['results'][0].sys_id
var response6 = http.get(thePath + '/feeds/' + feedID, params);
All of these tags show up in Datadog EXCEPt the “delete_one_schedule” and I don’t see why. I know the http.del query is working because I see the 204s in the logs and I can add the metric to a dashboard by choosing “from method:delete”. The tag I added does not appear as a choice.