Closed aiswaryapajit closed 1 year ago
hey! so discussed this with @actualwitch this morning.
if you want to track metrics of database queries, you would have to wrap your application code that calls the database. of course, this doesn't give you metrics on specific subqueries, and would include the latency of sending the request to the database server, however! it would give you metrics for getting the data your application needs from the database, which is closest to what your users would experience.
to make it concrete, this is what you'd be trying to do, application-side:
@autometrics
def list_all_users():
return db.query("select * from users")
can we use autometrics to be run at database side(postgresql) or is there any way to use api of autometrics