I'm using Javascript APM agent, I need to sent my report information to APM server. I want to sent below messages with two transactions with different customContext message. Actually what it happend is customContext message is same for two transactions. Could you please suggest , any other logics availble for this scenrio.
message = [{"name": "abc"}, {"name": xyz}]
apm = InitApm.init({
'serviceName': serviceName,
'serverUrl': serverUrl
});
for (msg in message) {
name = 'transaction-name' + msg.name;
transaction = apm.startTransaction(transactionName, 'custom');
httpSpan = transaction.startSpan(null, null);
apm.setCustomContext(msg);
httpSpan.end();
transaction.end();
}