Class TelemetryServiceExtensions
Extension methods for registering Typhon profiler services with dependency injection.
public static class TelemetryServiceExtensions
- Inheritance
-
TelemetryServiceExtensions
- Inherited Members
Methods
AddTyphonProfiler(IServiceCollection)
Forces early initialization of TelemetryConfig so the JIT sees the
final static readonly bool field values before compiling hot paths.
public static IServiceCollection AddTyphonProfiler(this IServiceCollection services)
Parameters
servicesIServiceCollectionThe service collection.
Returns
- IServiceCollection
The service collection for chaining.
Examples
services.AddTyphonProfiler();
Remarks
Call this method early in your application startup, before building the service provider, to ensure profiler configuration is loaded before hot paths are JIT compiled.
The static TelemetryConfig fields are initialized from
typhon.telemetry.json and environment variables in the static constructor.
They cannot be changed programmatically — to change a value, edit the file or
set the corresponding TYPHON__PROFILER__* environment variable before launch.