You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-11-20 12:02:22 +03:00
Add missing tracing to app session storage
This commit is contained in:
@@ -201,6 +201,14 @@ impl<'c> AppSessionRepository for PgAppSessionRepository<'c> {
|
|||||||
type Error = DatabaseError;
|
type Error = DatabaseError;
|
||||||
|
|
||||||
#[allow(clippy::too_many_lines)]
|
#[allow(clippy::too_many_lines)]
|
||||||
|
#[tracing::instrument(
|
||||||
|
name = "db.app_session.list",
|
||||||
|
fields(
|
||||||
|
db.statement,
|
||||||
|
),
|
||||||
|
skip_all,
|
||||||
|
err,
|
||||||
|
)]
|
||||||
async fn list(
|
async fn list(
|
||||||
&mut self,
|
&mut self,
|
||||||
filter: AppSessionFilter<'_>,
|
filter: AppSessionFilter<'_>,
|
||||||
@@ -346,6 +354,14 @@ impl<'c> AppSessionRepository for PgAppSessionRepository<'c> {
|
|||||||
Ok(page)
|
Ok(page)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[tracing::instrument(
|
||||||
|
name = "db.app_session.count",
|
||||||
|
fields(
|
||||||
|
db.statement,
|
||||||
|
),
|
||||||
|
skip_all,
|
||||||
|
err,
|
||||||
|
)]
|
||||||
async fn count(&mut self, filter: AppSessionFilter<'_>) -> Result<usize, Self::Error> {
|
async fn count(&mut self, filter: AppSessionFilter<'_>) -> Result<usize, Self::Error> {
|
||||||
let mut oauth2_session_select = Query::select()
|
let mut oauth2_session_select = Query::select()
|
||||||
.expr(Expr::cust("1"))
|
.expr(Expr::cust("1"))
|
||||||
|
|||||||
Reference in New Issue
Block a user