Disabling Traces in Elastic APM While Retaining Metrics

We are using the Elastic APM agent to monitor our applications. However, we only want to collect metrics and do not want to capture traces for the transactions.

Is there a way to disable trace collection while retaining metrics in the Elastic APM agent? If so, could you please guide us on how to configure this?