You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> **⚠️ Sampling Configuration:** Configure **either**`SamplingRatio`**or**`TracesPerSecond`, not both. Use `SamplingRatio` for percentage-based sampling (e.g., keep 50% of telemetry). Use `TracesPerSecond` for rate-limited sampling (e.g., keep at most 5 traces per second regardless of load).
// TracesPerSecond = 5.0, // OR: Keep max 5 traces/second
657
+
658
+
// Offline storage
659
+
StorageDirectory=@"C:\AppData\MyApp\Telemetry",
660
+
DisableOfflineStorage=false,
661
+
662
+
// Features
663
+
EnableLiveMetrics=true,
664
+
EnableTraceBasedLogsSampler=true
665
+
};
666
+
```
667
+
630
668
#### Configuring OpenTelemetry Integration
631
669
632
670
In version 3.x, you can extend the SDK using OpenTelemetry's extensibility model. Use `ConfigureOpenTelemetryBuilder()` to access the underlying OpenTelemetry configuration:
Copy file name to clipboardExpand all lines: WEB/Src/Web/README.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,3 +38,6 @@ public class Global : HttpApplication
38
38
**Note:** You need to install the `Azure.Identity` NuGet package to use AAD authentication.
39
39
40
40
For more information, see the [Azure.Identity documentation](https://learn.microsoft.com/dotnet/api/overview/azure/identity-readme).
41
+
42
+
### Sampling, Offline Storage, and other configuration
43
+
Other options can also be set via the TelemetryConfiguration in the `Global.asax.cs` file. See [documentation for Microsoft.ApplicationInsights](../../../BASE/README.smd#azure-monitor-exporter-options).
0 commit comments