I am using https://github.com/elastic/apm-agent-nodejs in a node application to send trace data to Elastic APM Server.
const getApm = (serviceName = 'my-service') =>
require('elastic-apm-node').start({
serviceName,
serverUrl:
'server url',
});
const apm = getApm();
apm.startTransaction('transaction1');
apm.startSpan(...)
...
I will send trace data to APM server and I am able to view them via Kibana. The trace id, start/end time is calculated by APM client or server. How can I provide my own trace id and start/end time for each transaction and its spans?