Skip to content

Commit d108227

Browse files
committed
mothra comments addressed
1 parent 552b8bc commit d108227

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

articles/azure-monitor/app/asp-net-dependencies.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Application Insights SDKs for .NET and .NET Core ships with `DependencyTrackingT
2929
|---------------|-------|
3030
|Http/Https | Local or Remote http/https calls |
3131
|WCF calls| Only tracked automatically if Http-based bindings are used.|
32-
|SQL | Calls made with `SqlClient`. |
32+
|SQL | Calls made with `SqlClient`. See [this](##advanced-sql-tracking-to-get-full-sql-query) for capturing SQL query . |
3333
|[Azure storage (Blob, Table, Queue )](https://www.nuget.org/packages/WindowsAzure.Storage/) | Calls made with Azure Storage Client. |
3434
|[EventHub Client SDK](https://www.nuget.org/packages/Microsoft.Azure.EventHubs) | Version 1.1.0 and above. |
3535
|[ServiceBus Client SDK](https://www.nuget.org/packages/Microsoft.Azure.ServiceBus)| Version 3.0.0 and above. |
@@ -66,18 +66,18 @@ For example, if you build your code with an assembly that you didn't write yours
6666

6767
```csharp
6868

69-
var startTime = DateTime.UtcNow;
70-
var timer = System.Diagnostics.Stopwatch.StartNew();
71-
try
72-
{
73-
// making dependency call
74-
success = dependency.Call();
75-
}
76-
finally
77-
{
78-
timer.Stop();
79-
telemetryClient.TrackDependency("myDependencyType", "myDependencyCall", "myDependencyData", startTime, timer.Elapsed, success);
80-
}
69+
var startTime = DateTime.UtcNow;
70+
var timer = System.Diagnostics.Stopwatch.StartNew();
71+
try
72+
{
73+
// making dependency call
74+
success = dependency.Call();
75+
}
76+
finally
77+
{
78+
timer.Stop();
79+
telemetryClient.TrackDependency("myDependencyType", "myDependencyCall", "myDependencyData", startTime, timer.Elapsed, success);
80+
}
8181
```
8282

8383
Alternatively, `TelemetryClient` provides extension methods `StartOperation` and `StopOperation` which can be used to manually track dependencies, as shown [here](custom-operations-tracking.md#outgoing-dependencies-tracking)

0 commit comments

Comments
 (0)