Skip to content

Log details of app being launched by dotnet(.exe) to ETW/LTTng #3156

Open
@DamianEdwards

Description

@DamianEdwards

There is a desire in certain environments to get details about .NET Core apps being launched in order to aid in analysis of issues, distribution of frameworks and dependencies being loaded, etc. (similar to the way that .NET apps log to the Windows Event log when they crash to capture details of failure). This can be particularly useful to discover how many apps are using a given shared framework version (to aid in planning to uninstall that version), or which apps are using a particular dependency (in case there is a security or compliance issue of some kind).

To this end, the host layer should log details about the app being launched to the appropriate sink for the OS (e.g. ETW on Windows, LTTng on Linux). The following details would be helpful:

  • Path and version of dotnet host
  • Path, name and version of any shared frameworks depended on by the application, including details of whether the app will run on that version or be rolled forward to a newer version
  • Path and contents of any additional deps being applied
  • Names and versions of any dependencies declared by the application in its deps file
  • Name and version of the application assembly
  • Path of the application assembly

It might be good to enable configuring which of these details is logged, e.g. via ETW event names or keywords.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-HostenhancementProduct code improvement that does NOT require public API changes/additions

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions