Skip to content

AddResourceMonitoring with options is marked as obsolete #6799

@leoquijano

Description

@leoquijano

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions