Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 717 Bytes

File metadata and controls

19 lines (13 loc) · 717 Bytes

OpenTelemetry ASP.NET Core 7 Web API Example

This example uses the new WebApplication host that ships with .NET 7 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