Skip to content

Make setting DOTNET_STARTUP_HOOKS optional #4491

@Rhynier

Description

@Rhynier

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

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions