Skip to content

Commit 4c4a0bb

Browse files
Merge pull request #248068 from vishweshbankwar/vishweshbankwar-patch-1
Update opentelemetry-add-modify.md [Fix sampling example and typo]
2 parents fe5ae3e + 6a82e8c commit 4c4a0bb

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

articles/azure-monitor/app/opentelemetry-add-modify.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ You can collect more data automatically when you include instrumentation librari
204204
205205
### [ASP.NET Core](#tab/aspnetcore)
206206

207-
To add a community library, use the `ConfigureOpenTelemetryMeterProvider` or `ConfigureOpenTelemetryTraceProvider` methods.
207+
To add a community library, use the `ConfigureOpenTelemetryMeterProvider` or `ConfigureOpenTelemetryTracerProvider` methods.
208208

209209
The following example demonstrates how the [Runtime Instrumentation](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.Runtime) can be added to collect extra metrics.
210210

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)