There are multiple ways you can track DB calls in app insights. The easiest one is the automatic dependencies collection if you integrate with your app using the SDK and your scenario falls within the list of service calls tracked automatically (currently as below). Refer Dependency Tracking in Azure Application Insights for details.
- SQL: Calls made with SqlClient. See this for capturing SQL query.
- Azure storage (Blob, Table, Queue): Calls made with Azure Storage Client.
- Azure Cosmos DB: Only tracked automatically if HTTP/HTTPS is used. TCP mode needs to be captured by manual instrumentation (see later).
If your scenario is not covered by automatic collection, you can Manually track dependencies from code.
For integrating app insights with your application, refer:
Application Insights for ASP.NET Core applications
Application Insights for .NET console applications
Application Insights for Worker Service applications (non-HTTP applications)
Codeless (agent based) monitoring
In either of the above cases, you can see from the Performance tab of app insights and also can dig into end to end trace details.
Apart from app insights, if you are using Azure SQL, it has very useful Query Performance Insight feature to analyze, identify bottlenecks and recommendation.