opentelemetry-dotnet/examples/AspNetCore
Vishwesh Bankwar 5ca8e98f1f
[otlp log exporter] Move logs extension methods to main otlp package (#4556)
2023-06-08 09:13:40 -07:00
..
Controllers [examples] Add manual activities and custom metrics to ASP.NET Core example (#4133) 2023-02-07 16:36:05 -05:00
Models Asp6sample (#2989) 2022-03-10 12:33:12 -08:00
Examples.AspNetCore.csproj [otlp log exporter] Move logs extension methods to main otlp package (#4556) 2023-06-08 09:13:40 -07:00
Instrumentation.cs [examples] Add manual activities and custom metrics to ASP.NET Core example (#4133) 2023-02-07 16:36:05 -05:00
Program.cs Add Exemplars for 1.6.0 prerelease versions (#4553) 2023-06-07 11:10:55 -07:00
README.md Asp6sample (#2989) 2022-03-10 12:33:12 -08:00
appsettings.json OTLP support for exporting exponential histograms (#4337) 2023-03-27 21:23:24 -07: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