File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ area : webapp
3+ type : improvement
4+ ---
5+
6+ Set ` application_name ` on Prisma connections from SERVICE_NAME so DB load can be attributed by service
Original file line number Diff line number Diff line change @@ -113,6 +113,7 @@ function getClient() {
113113 connection_limit : env . DATABASE_CONNECTION_LIMIT . toString ( ) ,
114114 pool_timeout : env . DATABASE_POOL_TIMEOUT . toString ( ) ,
115115 connection_timeout : env . DATABASE_CONNECTION_TIMEOUT . toString ( ) ,
116+ application_name : env . SERVICE_NAME ,
116117 } ) ;
117118
118119 console . log ( `🔌 setting up prisma client to ${ redactUrlSecrets ( databaseUrl ) } ` ) ;
@@ -236,6 +237,7 @@ function getReplicaClient() {
236237 connection_limit : env . DATABASE_CONNECTION_LIMIT . toString ( ) ,
237238 pool_timeout : env . DATABASE_POOL_TIMEOUT . toString ( ) ,
238239 connection_timeout : env . DATABASE_CONNECTION_TIMEOUT . toString ( ) ,
240+ application_name : env . SERVICE_NAME ,
239241 } ) ;
240242
241243 console . log ( `🔌 setting up read replica connection to ${ redactUrlSecrets ( replicaUrl ) } ` ) ;
You can’t perform that action at this time.
0 commit comments