Track requests that does not close all the db connections that initially opened (Java & Oracle)

DynaTrace won’t keep track of DB connection as a garbage collection view, and monitoring connection close events is only one side of the story.

You might get a better picture monitoring both, open and close connection events at the same time, with two separate metrics. That way, you could compare them and realize not as many connections are being closed as opened. That would indicate the application is leaking DB connections into memory.

On a side note, several applications rely on database connection pools provided by 3rd party libs or the application server where they run. In those cases, the application is calling “open” and “close” methods for DB connections, but that may not necessarilt mean network connections events. Most of the time, the pool library will handle a constant number of network connections, while intercepting “open” and “close” events from the application. The application may think it’s “opening” a db connection, but in reality connections are just handed in-and-out of a constant pool.

For such applications, you might get a better view of the situation by monitoring the database connection pool, and alert when it reaches max capacity.