// Start a trace event with only a name
lynx.performance.profileStart('DataFetch');
// Start a trace event with custom arguments
lynx.performance.profileStart('DataFetch', {
args: { url: 'https://api.example.com/data', method: 'GET' },
});
// Start a trace event with a flow id
const flowId = lynx.performance.profileFlowId();
lynx.performance.profileStart('UserAction', { flowId });
// Start a duration event with both arguments and flow ID
lynx.performance.profileStart('ComplexProcess', {
args: { step: 'start' },
flowId,
});