-
Notifications
You must be signed in to change notification settings - Fork 832
Open
Labels
Description
Description
I'm currently working on MacOS and it seems like https://source.dot.net/#Microsoft.Extensions.Diagnostics.ResourceMonitoring/ResourceMonitoringServiceCollectionExtensions.cs,7ba4439b710f2460,references throws an exception if the OS is not supported.
I would prefer it did a no-op. We go through all OS' and we need to do:
if (!OperatingSystem.IsMacOS())
{
builder.Services.AddResourceMonitoring();
}
In the calling code.
Reproduction Steps
Run builder.Services.AddResourceMonitoring();
.
Expected behavior
Just do no-op and return early if not supported OS.
Actual behavior
Throws exception
Regression?
No response
Known Workarounds
Add if statement at consuming code
Configuration
No response
Other information
No response