Every EF call records at least two things – a performance metric and a log statement at the start of execution. If the call throws an exception you’ll also get a message at the end with the result information (logged as a warning so it’ll show up as a Loupe Application Event).
The log message includes the SQL statement, parameter values, information on the transaction (so on a busy system you can see what statements were really part of the same transaction, even if there are multiple operations on the same thread concurrently) as well as the server and call stack that got you there. You can tune the agent to increase or decrease the amount of detail recorded in configuration or at runtime.
For more information, see Using Loupe with Entity Framework - Tracing Actions
The performance metric includes the SQL statement, execution duration, success or failure, and number of rows affected. Using this information, Loupe Desktop can identify the top queries by duration, frequency, or total execution time and categorize performance of the same query by different input parameters.
For more information, see Using Loupe with Entity Framework - Analyzing Performance.