Javascript APM agent pass message with transaction

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' +;
	transaction = apm.startTransaction(transactionName, 'custom');
    httpSpan = transaction.startSpan(null, null);


Thanks for your interest in Elastic APM.
The apm.setCustomContext sets the global custom context that will be included in every transaction and error. Currently we don't support setting context on individual transactions, I have created this issue to keep track of this feature request. Please feel free to make comments on the issue.


Thank you for your reply.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.