The plugins available for PostgreSQL measure the performance of the database as a whole, not the individual queries. In the plugins you’ll get data like CPU usage, memory, number of connections, I/O usage, etc.
Your best option is to use custom instrumentation to capture the calls. You won’t be able to see them on the Database page, but they will show up as segments in a transaction and you can use the Metric Explorer in Insights to pinpoint those transactions and create a custom dashboard to review them. I would strongly suggest you use a specific name for the segments of the requests so they’re easily identifiable and a wildcard can be used to group them. Something like the following would be good:
The rest of the segment could contain either the general
SELECT name or the name of the stored procedure. When creating the widget in the Metric Explorer, you can change the results to
Custom/Database/PostreSQL/% by clicking on the last segment in the transaction name after the chart has been selected. This will load all of the metrics in that segment.
How you custom instrument the database calls will be up to you. You can use both XML instrumentation or the .Net agent API. Using the API requires making changes to your source code. The advantage of using XML instrumentation is you can just drop the file in the
C:\ProgramData\New Relic\.NET agent\Extensions directory and it will instrument the methods accordingly.
I would also strongly suggest you head over to the Feature Idea section for the .NET agent and submit a request for support of PostgreSQL using data providers other than Npgsql .NET Data Provider. That will get this in front of the product manager and give the opportunity for others to vote on the idea. While we can’t guarantee when or if a feature will be implemented, we take customer requests very seriously and use them to prioritize which features we implement next.