Weekly about 10,000 records are inserted and there is a Trigger that calls a class to process these records. All this process is synchronous, but for some cases it's taking too long to process and getting CPU time limit error. In that case I have to change the class for a future method or batch? I don't know how to handle that in a asynchronous way since I have to get just the records that are inserted.
Find out what consumes the most CPU Time
In Developer Console ==> Select Debug on the top menu -> Switch Perspective -> Analysis (Predefined)
Choose Timeline ==> Scale (Choose the one fits you).
On this timeline view above, we can now see that Apex, Workflow, and Database actions are executed in sequence and how much time each of them consumes.
One of the common reasons we hit the CPU limit is that the trigger logic enters unexpectedly multiple times. Trigger logic finishes first, workflow follows to update the record which then causes the trigger logic to re-enter.
Another reason is the trigger custom code logic itself. Is your Apex code performant? For example, nested loops can be very slow when processing a large volume of records.
You Can also check the API REQUESTS, LAST 24 HOURS under System Overview
Setup --> Environments --> System Overview
We can see the API Usages for last 24 Hours.