aspnet / Benchmarks

Benchmarks for ASP.NET Core
Other
1.18k stars 242 forks source link

Add OpenTelemetry to TodosApi #2014

Closed eerhardt closed 2 months ago

eerhardt commented 3 months ago

This adds the default OpenTelemetry configuration used by .NET Aspire ServiceDefaults - enable instrumentation for:

and OTLP exporter.

Also update to the latest Nanorm version.

Note that this increases the size of the published app from 18.1 MB => 22.2 MB on win-x64. I plan on opening investigation issues in OpenTelemetry to reduce this size. If I remove the OTLP exporter, the size drops to 20.0 MB. I've opened https://github.com/open-telemetry/opentelemetry-dotnet/issues/5785 to discuss if there is anything we can do to decrease the amount of app size OTel adds to the app.