1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-07-29 22:01:14 +03:00

Track the database connection acquisition time and pool usage

This commit is contained in:
Quentin Gliech
2023-07-06 18:35:31 +02:00
parent ca520dfd9a
commit f5143c045e
4 changed files with 70 additions and 12 deletions

View File

@ -141,17 +141,22 @@ impl Options {
let graphql_schema = mas_handlers::graphql_schema(&pool, conn);
let state = AppState {
pool,
templates,
key_store,
encrypter,
url_builder,
homeserver,
policy_factory,
graphql_schema,
http_client_factory,
password_manager,
let state = {
let mut s = AppState {
pool,
templates,
key_store,
encrypter,
url_builder,
homeserver,
policy_factory,
graphql_schema,
http_client_factory,
password_manager,
conn_acquisition_histogram: None,
};
s.init_metrics()?;
s
};
let mut fd_manager = listenfd::ListenFd::from_env();