opentelemetry-dotnet/examples/AspNetCore
Mikel Blanchard dd342f0508
[Logs] Remove ConfigureResource on OpenTelemetryLoggingOptions (#3999)
* Removed ConfigureResource on OpenTelemetryLoggingOptions.

* Patch CHANGELOG.
2022-12-09 13:26:31 -08:00
..
Controllers Fix analyzers (#3053) 2022-04-01 07:46:32 -07:00
Models Asp6sample (#2989) 2022-03-10 12:33:12 -08:00
Examples.AspNetCore.csproj add nullable enable to Common.props and disable in projects. (#3964) 2022-12-05 15:33:57 -08:00
Program.cs [Logs] Remove ConfigureResource on OpenTelemetryLoggingOptions (#3999) 2022-12-09 13:26:31 -08:00
README.md Asp6sample (#2989) 2022-03-10 12:33:12 -08:00
appsettings.json [DependencyInjection] Introduce new package and refactor SDK (#3923) 2022-12-08 15:24:44 -08:00

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

  1. OpenTelemetry logging
  2. OpenTelemetry metrics
  3. 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.

References