Co-authored-by: Yun-Ting Lin <yunl@microsoft.com> |
||
|---|---|---|
| .. | ||
| Controllers | ||
| Models | ||
| Examples.AspNetCore.csproj | ||
| Instrumentation.cs | ||
| Program.cs | ||
| README.md | ||
| appsettings.json | ||
README.md
OpenTelemetry ASP.Net Core 6 Web API Example
This example uses the new WebApplication host that ships with .Net 6 and shows how to setup
- OpenTelemetry logging
- OpenTelemetry metrics
- OpenTelemetry tracing
ResourceBuilder is associated with OpenTelemetry to associate the
service name, version and the machine on which this program is running.
The sample rate is set to emit all the traces using AlwaysOnSampler.
You can try out different samplers like TraceIdRatioBasedSampler.