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

Deprecate IResourceUtilizationPublisher #5360

Merged

Conversation

evgenyfedorov2
Copy link
Contributor

@evgenyfedorov2 evgenyfedorov2 commented Aug 14, 2024

Fixes #4404.

Deprecating the IResourceUtilizationPublisher interface as per the mentioned issue. Consequences:

  • The same resource utilization data is still published via metrics (observable instruments), whose names are available in the ResourceUtilizationInstruments class. This is the recommended way to consume the resource utilization data.
  • Raw data can still be consumed via the IResourceMonitor interface.

After retiring of IResourceUtilizationPublisher, the ResourceMonitorBuilder class, as well as the respective interface IResourceMonitorBuilder, both do not bring much value. Happy to discuss if it makes sense to deprecate them too.

Microsoft Reviewers: Open in CodeFlow

@RussKie RussKie added the waiting-author-feedback 📭 The author of this issue needs to respond in order for us to continue investigating this issue. label Aug 15, 2024
@dotnet-policy-service dotnet-policy-service bot removed the waiting-author-feedback 📭 The author of this issue needs to respond in order for us to continue investigating this issue. label Aug 15, 2024
@RussKie
Copy link
Member

RussKie commented Aug 19, 2024

Based on the feedback, I suggest the following course of action:

  1. Create a new obsoletion diagnostics code and add it to our DiagnosticIds class (add a new Obsoletions class inside):
    internal static class DiagnosticIds
  2. Decorate the API with ObsoleteAttribute in manner similar to this using the new diagnostics code.
  3. Update our documentation.
  4. Add the new diagnostics code to aka.ms.

@RussKie
Copy link
Member

RussKie commented Aug 19, 2024

The new "obsoletion" code naming convention is up for a debate. EXT5xxx?

Thoughts/ideas/suggestions?

/cc: @joperezr

@RussKie RussKie added the waiting-author-feedback 📭 The author of this issue needs to respond in order for us to continue investigating this issue. label Aug 19, 2024
@joperezr
Copy link
Member

I don't really have any preference. I'd just look at precedent in case runtime or aspnetcore have special conventions for these, and if not then just do what we would've done for a regular diagnostic id.

@dotnet-policy-service dotnet-policy-service bot removed the waiting-author-feedback 📭 The author of this issue needs to respond in order for us to continue investigating this issue. label Aug 22, 2024
@evgenyfedorov2
Copy link
Contributor Author

Based on the feedback, I suggest the following course of action:

  1. Create a new obsoletion diagnostics code and add it to our DiagnosticIds class (add a new Obsoletions class inside):
    internal static class DiagnosticIds
  2. Decorate the API with ObsoleteAttribute in manner similar to this using the new diagnostics code.
  3. Update our documentation.
  4. Add the new diagnostics code to aka.ms.
  1. Done
  2. Done
  3. Done
  4. Please guide me how/where can I do that?

Copy link
Member

@RussKie RussKie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a little more work to be done, but overall looks good. 👍

src/Shared/DiagnosticIds/DiagnosticIds.cs Outdated Show resolved Hide resolved
docs/list-of-diagnostics.md Outdated Show resolved Hide resolved
@RussKie RussKie added the waiting-author-feedback 📭 The author of this issue needs to respond in order for us to continue investigating this issue. label Aug 23, 2024
@dotnet-policy-service dotnet-policy-service bot removed the waiting-author-feedback 📭 The author of this issue needs to respond in order for us to continue investigating this issue. label Aug 23, 2024
docs/list-of-diagnostics.md Show resolved Hide resolved
@RussKie RussKie merged commit 8446f25 into dotnet:main Aug 26, 2024
6 checks passed
@RussKie
Copy link
Member

RussKie commented Aug 26, 2024

Thank you

@RussKie
Copy link
Member

RussKie commented Aug 26, 2024

Please add a link to the docs update PR, when you have it.

@github-actions github-actions bot locked and limited conversation to collaborators Sep 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Retire IResourceMonitorPublisher in favor of observable instruments
7 participants