Class OpenTelemetryServiceExtensions
- Namespace
- ProjectTemplate.Web.Extensions
- Assembly
- ProjectTemplate.Web.dll
Provides extension methods to register OpenTelemetry services for the application.
public static class OpenTelemetryServiceExtensions
- Inheritance
-
OpenTelemetryServiceExtensions
- Inherited Members
Methods
AddApplicationOpenTelemetry(IServiceCollection, IConfiguration, IHostEnvironment)
Adds baseline OpenTelemetry tracing and metrics support.
public static IServiceCollection AddApplicationOpenTelemetry(this IServiceCollection services, IConfiguration configuration, IHostEnvironment environment)
Parameters
servicesIServiceCollectionThe service collection to add OpenTelemetry services to.
configurationIConfigurationThe application configuration source.
environmentIHostEnvironmentThe current hosting environment.
Returns
- IServiceCollection
The same service collection instance so calls can be chained.