You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
@autometricsdeflist_all_users():
returndb.query("select * from users")
brettimus
changed the title
can we use autometrics to be run at database side(postgresql) or is there any way to use api of autometrics
Question: Using autometrics in a database (postgresql)?
Jul 21, 2023
a little bit off topic, but @actualwitch pointed out that lots of python APIs will use context instead of functions for this kind of (db) operation. she proposed supporting instrumentation via context manager here
can we use autometrics to be run at database side(postgresql) or is there any way to use api of autometrics
The text was updated successfully, but these errors were encountered: