We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b13694b commit 6a82e8cCopy full SHA for 6a82e8c
articles/azure-monitor/app/opentelemetry-configuration.md
@@ -258,8 +258,10 @@ The sampler expects a sample rate of between 0 and 1 inclusive. A rate of 0.1 me
258
```csharp
259
var builder = WebApplication.CreateBuilder(args);
260
261
-builder.Services.AddOpenTelemetry().UseAzureMonitor();
262
-builder.Services.Configure<ApplicationInsightsSamplerOptions>(options => { options.SamplingRatio = 0.1F; });
+builder.Services.AddOpenTelemetry().UseAzureMonitor(o =>
+{
263
+ o.SamplingRatio = 0.1F;
264
+});
265
266
var app = builder.Build();
267
0 commit comments