After installing MSSQL extension we've discovered that, some requests coming from IIS are opening multiple connections, but not closing. We've confirmed this after seeing multiple "sleeping" processes that keeps piling up in the DB.
We're trying to find out all the requests that opens more than 10 connections, such as shown in the screenshot.
I tried doing this from Diagnostic tools, but could not find anything helpful. Do we have any functionality to accomplish this? Maybe even via API?
You may want to review this section of Dynatrace Help on some use cases of request attributes:
I'd say you'd want to create a request attribute that counts the number of occurrences of that method. Then, you could use that as the basis for a custom error. You could also create a calculated service metric and access those results via the REST API.
Well, that's actually a good idea. I tried going with it for both Custom Attributes and Custom Service, the problem is that, the method is not instrumentable due to safety reasons. Can we override it?
That's probably because Dynatrace reserves that method for capturing database insights and statement details.
Is it possible to wrap the method in another in your code that could then be counted? I know it's not ideal, but I couldn't really see another way, except maybe creating a custom service.
We've also spoken to Dynatrace sales engineer at the parallel to clarify the situation. He mentioned that, in AppMon lots of customers tried using Open() as entry point and broke their systems, so this was some kind of counter measure.
He gave us some alternative solution instead of what we're trying to do. Maybe we can find the problematic requests from the DB side.
I've also find out that IIS has an API. I can do some queries about app pools and worker processes, then push the relevant numbers as a metric. I've notified the developers, we'll see how they prefer to proceed.