You can use Elastic APM to monitor the response times of your API endpoints. There is no Elastic-supported agent for PHP yet (one is coming! see Elastic APM PHP Agent), however there are several PHP agents developed by community members, e.g.
- https://github.com/philkra/elastic-apm-php-agent
- https://github.com/frankkoornstra/elastic-apm-agent
Regarding swagger-stats: it's not clear to me what you want to do, since you mentioned your app is written in PHP, but swagger-stats appears to be for Node.js. Are you just using this as an example of what you want to achieve? From what I can see (I don't know swagger-stats), it looks like it produces roughly similar data to Elastic APM.