Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose Runtime Crash Reporting (MERP) capabilities in .NET Core #32117

Closed
alexischr opened this issue Feb 11, 2020 · 7 comments
Closed

Expose Runtime Crash Reporting (MERP) capabilities in .NET Core #32117

alexischr opened this issue Feb 11, 2020 · 7 comments
Assignees
Milestone

Comments

@alexischr
Copy link
Contributor

alexischr commented Feb 11, 2020

The API for MERP telemetry in Mono is currently located exclusively in
https://github.com/mono/mono/blob/master/mcs/class/corlib/Mono/Runtime.cs#L101-L270

We will need to reintroduce this Mono-specific code in System.Private.Corlib or elsewhere, at least the subset needed by VS4Mac telemetry.

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Feb 11, 2020
@alexischr alexischr changed the title [mono [mono] Removed Mono.Runtime class breaks MERP Feb 11, 2020
@lambdageek lambdageek added area-VM-meta-mono runtime-mono specific to the Mono runtime and removed untriaged New issue has not been triaged by the area owner labels Feb 13, 2020
@lambdageek lambdageek added this to the 5.0 milestone Feb 13, 2020
@alexischr
Copy link
Contributor Author

@stephentoub @marek-safar This will be a required API for VS4Mac on .NET 5.0 - it is how VS4Mac provides telemetry to Microsoft Error Reporting. How do you propose we reintroduce it?

The solution of least friction would probably be to put the API in Mono's System.Private.CoreLib.dll. We can also try to unify the API CoreCLR's, or create a new one to serve both.

@jkotas
Copy link
Member

jkotas commented Feb 20, 2020

These APIs look very proprietary to Microsoft. APIs with names like SendMicrosoftTelemetry are not ever going to make it as public .NET Runtime API. There is actually a real risk of very bad PR from APIs like this. We had a few of those over the years. It was never a fun to deal with it.

What would make sense as public .NET Runtime APIs are policy-free APIs that let you register callbacks for interesting events, such as fatal crash, unhanded exception, etc. Visual Studio for Mac can then use these APIs to register callbacks to their own implementations that implements hookup to Microsoft telemetry pipeline.

.NET Framework had APIs like this (e.g. https://docs.microsoft.com/en-us/dotnet/framework/unmanaged-api/hosting/iclrerrorreportingmanager-interface). These APIs were exposed via COM that is not necessarily the most friendly cross-platform way to do it. I think we would want to have a plain-vanilla C callbacks instead. But it is something we can look at as prior art.

@marek-safar marek-safar removed area-CoreLib-mono runtime-mono specific to the Mono runtime labels Feb 20, 2020
@marek-safar marek-safar changed the title [mono] Removed Mono.Runtime class breaks MERP Expose Runtime Crash Reporting (MERP) capabilities in .NET Core Feb 20, 2020
@marek-safar
Copy link
Contributor

The existing internal APIs are not something we would like to add to netcore but starting point for hopefully publicly exposable better version. Right now this API is internal, accessible via reflection only, specific to Mono, etc all this should be avoided in net5.

@jkotas who should lead the design work for net5?

@jkotas
Copy link
Member

jkotas commented Feb 20, 2020

These internal APIs are only needed for VS Mac. Is that correct?

If it is the case, this falls into embedding APIs required to support VS Mac theme. This theme was de-prioritized for .NET 5, so I do not think we are going to spend cycles on designing public APIs and harmonizing this between CoreCLR and Mono in .NET 5.

If we need to start experimenting with VS Mac on .NET 5 Mono, we can keep using whatever mono/mono had to make it work - until we get the harmonizing this class of APIs between CoreCLR and Mono.

@jkotas
Copy link
Member

jkotas commented Feb 21, 2020

If you would like to see this API happen in .NET 5 as public .NET Runtime API, I think somebody from the VS Mac on .NET 5 virtual team needs to write the initial API proposal. The hard part is to figure what a good public API shape for this should be.

@SamMonoRT
Copy link
Member

@marek-safar - I believe it is now ok to remove this from the 5.0 milestone ?

@marek-safar marek-safar removed this from the 5.0 milestone May 12, 2020
@alexischr alexischr self-assigned this May 21, 2020
@lambdageek lambdageek added this to the 6.0.0 milestone Jun 22, 2020
@SamMonoRT SamMonoRT assigned imhameed and unassigned alexischr Sep 8, 2020
@lambdageek lambdageek modified the milestones: 6.0.0, 7.0.0 Jun 8, 2021
@lambdageek
Copy link
Member

We will look at other alternatives to the in-proc mono crash reporting code for a future release.

@ghost ghost locked as resolved and limited conversation to collaborators Nov 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants