This week, one of my customers suddenly started having severe performance issues with a custom Dynamics GP web API that I developed for them a few years ago.
The customer and their Dynamics GP partner immediately knew about the performance problem because the web API has logic to detect certain performance issues, log the problem, and proactively send an email notification to the customer and GP partner.
This is a sample of the log file that told me everything I needed to know to work on diagnosing the issue.
Full Time Debug Level Logging with Elapsed Time Measurement |
Notice that the elapsed time (in parens) jumps from 0.09 seconds to 32.96 seconds when the GetCCCustomerProfileID step completes? That step normally takes a few milliseconds, but was suddenly taking 20-40 seconds to complete. No bueno. That step calls an on-premises web service for a credit card management system, and that system was experiencing a problem. Fortunately, my code is setup to log a warning and send an email whenever an operation takes more than 20 seconds, so admins were notified as soon as the problem started.