Skip to content

Commit 6a82e8c

Browse files
Update opentelemetry-configuration.md
1 parent b13694b commit 6a82e8c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

articles/azure-monitor/app/opentelemetry-configuration.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,10 @@ The sampler expects a sample rate of between 0 and 1 inclusive. A rate of 0.1 me
258258
```csharp
259259
var builder = WebApplication.CreateBuilder(args);
260260

261-
builder.Services.AddOpenTelemetry().UseAzureMonitor();
262-
builder.Services.Configure<ApplicationInsightsSamplerOptions>(options => { options.SamplingRatio = 0.1F; });
261+
builder.Services.AddOpenTelemetry().UseAzureMonitor(o =>
262+
{
263+
o.SamplingRatio = 0.1F;
264+
});
263265

264266
var app = builder.Build();
265267

0 commit comments

Comments
 (0)