Open seabaylea opened 8 years ago
We'd probably provide two callbacks: at the start and end of execute()
. The start would provide the raw query string.
By "end" I mean just before the callback is invoked - we don't want to monitor how long the resulting business logic takes.
I'm not sure if I like the API to work by passing in callback functions as arguments. Maybe instead just provide a delegate protocol- that various monitoring components can plug in to the database Swift client driver?
Sorry, that's exactly what I meant. Like we're doing in Kitura-net for Request start/end.
In order to be able to do complete monitoring of a deployed application, its also important to be able to monitor database calls for to understand their performance and whether errors are occurring.
The basic data that would be needed is the equivalent for what we collect for MySQL queries on Node.js in 'appmetrics': https://www.npmjs.com/package/appmetrics
Additionally in the future we may also want the ability to be able to insert fault injection, and circuit breaking functionality, etc.