Skip to content

Commit

Permalink
Improved resource detector docs
Browse files Browse the repository at this point in the history
  • Loading branch information
cromefire committed Mar 6, 2023
1 parent c7c6d09 commit 290d486
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/OpenTelemetry.Extensions.Hosting/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,9 @@ services.AddSingleton<MyResourceDetector>();

services.AddOpenTelemetry()
.ConfigureResource(builder =>
builder.AddDetector(sp => sp!.GetRequiredService<MyResourceDetector>()))
WithTracing(builder => builder.AddConsoleExporter());
builder.AddDetector(sp => sp.GetRequiredService<MyResourceDetector>()))
.WithTracing(builder => builder.AddConsoleExporter())
.WithMetrics(builder => builder.AddConsoleExporter());
```

## Migrating from pre-release versions of OpenTelemetry.Extensions.Hosting
Expand Down

0 comments on commit 290d486

Please sign in to comment.