Skip to content

Commit 3803344

Browse files
authored
indents, spacing, edits
1 parent 1278e1e commit 3803344

1 file changed

Lines changed: 26 additions & 13 deletions

File tree

docs/connect/ado-net/enable-eventsource-tracing.md

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Enabling event tracing in SqlClient"
2+
title: "Enable event tracing in SqlClient"
33
description: "Describes how to enable event tracing in SqlClient by implementing an event listener and how to access the event data."
44
ms.date: "11/23/2020"
55
dev_langs:
@@ -12,7 +12,7 @@ author: johnnypham
1212
ms.author: v-jopha
1313
ms.reviewer:
1414
---
15-
# Enabling event tracing in SqlClient
15+
# Enable event tracing in SqlClient
1616

1717
[!INCLUDE [appliesto-netfx-netcore-netst-md](../../includes/appliesto-netfx-netcore-netst-md.md)]
1818

@@ -99,28 +99,41 @@ class Program
9999
}
100100
```
101101

102-
### Using Xperf to collect trace log
102+
### Use Xperf to collect trace log
103103

104104
1. Start tracing using the following command line.
105-
```
106-
xperf -start trace -f myTrace.etl -on *Microsoft.Data.SqlClient.EventSource
107-
```
105+
106+
```
107+
xperf -start trace -f myTrace.etl -on *Microsoft.Data.SqlClient.EventSource
108+
```
109+
108110
2. Run the native SNI tracing example to connect to SQL Server.
111+
109112
3. Stop tracing using the following command line.
110-
```
111-
xperf -stop trace
112-
```
113+
114+
```
115+
xperf -stop trace
116+
```
117+
113118
4. Use PerfView to open the myTrace.etl file specified in Step 1. The SNI tracing log can be found with `Microsoft.Data.SqlClient.EventSource/SNIScope` and `Microsoft.Data.SqlClient.EventSource/SNITrace` event names.
114-
![Use PerfView to view SNI trace file](media/view-event-trace-native-sni.png)
115119

116-
### Using PerfView to collect trace log
120+
![Use PerfView to view SNI trace file](media/view-event-trace-native-sni.png)
121+
122+
123+
### Use PerfView to collect trace log
117124

118125
1. Start PerfView and run `Collect > Collect` from menu bar.
126+
119127
2. Configure trace file name, output path, and provider name.
120-
![Configure Prefview before collection](media/collect-event-trace-native-sni.png)
128+
129+
![Configure Prefview before collection](media/collect-event-trace-native-sni.png)
130+
121131
3. Start collection.
132+
122133
4. Run the native SNI tracing example to connect to SQL Server.
134+
123135
5. Stop collection from PerfView. It will take a while to generate PerfViewData.etl file according to configuration in Step 2.
136+
124137
6. Open the etl file in PerfView. The SNI tracing log can be found with `Microsoft.Data.SqlClient.EventSource/SNIScope` and `Microsoft.Data.SqlClient.EventSource/SNITrace` event names.
125138

126139

@@ -130,4 +143,4 @@ For more information, see the following resources.
130143
|Resource|Description|
131144
|--------------|-----------------|
132145
|[EventSource Class](/dotnet/api/system.diagnostics.tracing.eventsource)|Provides the ability to create ETW events.|
133-
|[EventListener Class](/dotnet/api/system.diagnostics.tracing.eventlistener)|Provides methods for enabling and disabling events from event sources.|
146+
|[EventListener Class](/dotnet/api/system.diagnostics.tracing.eventlistener)|Provides methods for enabling and disabling events from event sources.|

0 commit comments

Comments
 (0)