Created
December 5, 2025 07:56
-
-
Save wullemsb/789928e3e2939c3a692af6d967b184e7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Microsoft.Extensions.DependencyInjection; | |
| using Microsoft.Extensions.Hosting; | |
| using OpenTelemetry.Metrics; | |
| var builder= Host.CreateDefaultBuilder(args); | |
| builder.ConfigureServices(s => | |
| { | |
| s.AddOpenTelemetry() | |
| .WithMetrics(metrics => | |
| { | |
| metrics | |
| .AddMeter("MyCompany.MyApp.*"); | |
| }); | |
| }); | |
| var app = builder.Build(); | |
| app.Run(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment