Skip to content

Commit cf221da

Browse files
authored
CC65352, 65353, 65354, 65355, 65356: Fixing code highlight
Hello, @mrbullwinkle, This proposed file change comes from https://github.com/MicrosoftDocs/azure-docs.zh-tw/pull/101. Could you review this contribution and help to merge if agreed? Many thanks in advance.
1 parent 4e1ad0e commit cf221da

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

articles/application-insights/app-insights-api-filtering-sampling.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ To filter telemetry, you write a telemetry processor and register it with the SD
5050

5151
Notice that Telemetry Processors construct a chain of processing. When you instantiate a telemetry processor, you pass a link to the next processor in the chain. When a telemetry data point is passed to the Process method, it does its work and then calls the next Telemetry Processor in the chain.
5252

53-
``` C#
53+
```csharp
5454

5555
using Microsoft.ApplicationInsights.Channel;
5656
using Microsoft.ApplicationInsights.Extensibility;
@@ -97,7 +97,7 @@ To filter telemetry, you write a telemetry processor and register it with the SD
9797
```
9898
1. Insert this in ApplicationInsights.config:
9999

100-
```XML
100+
```xml
101101

102102
<TelemetryProcessors>
103103
<Add Type="WebApplication9.SuccessfulDependencyFilter, WebApplication9">
@@ -137,7 +137,7 @@ TelemetryClients created after this point will use your processors.
137137
#### Synthetic requests
138138
Filter out bots and web tests. Although Metrics Explorer gives you the option to filter out synthetic sources, this option reduces traffic by filtering them at the SDK.
139139

140-
``` C#
140+
```csharp
141141

142142
public void Process(ITelemetry item)
143143
{
@@ -178,7 +178,7 @@ If you only want to diagnose calls that are slow, filter out the fast ones.
178178
>
179179
>
180180
181-
``` C#
181+
```csharp
182182

183183
public void Process(ITelemetry item)
184184
{
@@ -251,13 +251,15 @@ If you provide a telemetry initializer, it is called whenever any of the Track*(
251251

252252
In ApplicationInsights.config:
253253

254+
```xml
254255
<ApplicationInsights>
255256
<TelemetryInitializers>
256257
<!-- Fully qualified type name, assembly name: -->
257258
<Add Type="MvcWebRole.Telemetry.MyTelemetryInitializer, MvcWebRole"/>
258259
...
259260
</TelemetryInitializers>
260261
</ApplicationInsights>
262+
```
261263

262264
*Alternatively,* you can instantiate the initializer in code, for example in Global.aspx.cs:
263265

0 commit comments

Comments
 (0)