extensions icon indicating copy to clipboard operation
extensions copied to clipboard

AddResourceMonitoring with options is marked as obsolete

Open leoquijano opened this issue 3 months ago • 1 comments

Description

We're using the .NET resource monitoring API to obtain metrics for CPU and Memory usage. There's one option that is mandatory for us to use, to work around a bug that wasn't directly fixed in code (the issue reported in #5472).

The problem that we have now is that when we try to use AddResourceMonitoring overload that accepts options, it comes up as obsolete. Is this intentional? My understanding is that the IResourceMonitor API was marked as obsolete (#5773), but that the .NET resource monitoring library is the right one to use now.

Is that case? If so, which method should I use to configure options for this functionality?

Reproduction Steps

Try to call AddResourceMonitoring(IServiceCollection, Action<IResourceMonitorBuilder>) in code.

Expected behavior

We should be able to use this method without any compiler warnings or errors.

Actual behavior

The compiler throws an error due to the method being obsolete, and no alternatives are given.

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

leoquijano avatar Sep 11 '25 03:09 leoquijano