-
Notifications
You must be signed in to change notification settings - Fork 123
Description
Feature Request
To use the auto instrumentation customers currently have to set both the profiler environment variables as well as the DOTNET_STARTUP_HOOKS environment variable. This really does not add any additional value to setup and is just a redundant step. The profiler could just ensure that the auto instrumentation initialization occurs.
Describe the solution you'd like
Since we are already loading the auto instrumentation profiler, it can hook into a well-known method and inject code to ensure that the exact same startup behavior happens, but without setting the DOTNET_STARTUP_HOOKS environment variable.
This could happen in, for instance
- System.StartupHookProvider.ManagedStartup: Modify diagnosticsStartupHooks parameter by adding OpenTelemetry assembly
- System.StartupHookProvider.ProcessStartupHooks: Similar to above
- System.AppContext.GetData: Modify returned data for "STARTUP_HOOKS"
Describe alternatives you've considered
There aren't really alternatives to this. Either the DOTNET_STARTUP_HOOKS setting is required or with this change it is not.
Tip: React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.