A tracing profiler like the Elastic APM Python Agent isn't a great fit for instrumenting all function/method calls. Every call we instrument comes with a little bit of overhead. This is acceptable when instrumenting calls that are known to take some time (e.g. when they involve some kind of I/O, like database calls or HTTP requests), but when instrumenting calls that only take microseconds to execute, the overhead starts to dominate.
We suggest to use a statistical profiler like py-spy to find slow calls e.g. by running your test suite, and then use
elasticapm.capture_span() to instrument the calls that seem slowest according to the statistical profiler. This will then give you contextual information about those calls that a statistical profiler can't give.