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

Address Metrics APIs issues #86740

Merged
merged 6 commits into from
May 26, 2023
Merged

Conversation

tarekgh
Copy link
Member

@tarekgh tarekgh commented May 25, 2023

The changes here addressing the following issues:

@dotnet-issue-labeler dotnet-issue-labeler bot added needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners new-api-needs-documentation labels May 25, 2023
@dotnet-issue-labeler
Copy link

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

@ghost ghost assigned tarekgh May 25, 2023
@tarekgh tarekgh requested a review from noahfalk May 25, 2023 01:32
@tarekgh tarekgh added area-System.Diagnostics.Metric and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels May 25, 2023
@tarekgh tarekgh added this to the 8.0.0 milestone May 25, 2023
@@ -7,62 +7,241 @@ namespace System.Diagnostics
{
internal static class DiagnosticsHelper
{
internal static bool CompareTags(IEnumerable<KeyValuePair<string, object?>>? tags1, IEnumerable<KeyValuePair<string, object?>>? tags2)
// This is similar to System.Linq ToArray. We are not using System.Linq here to avoid the dependency.
Copy link
Member

Choose a reason for hiding this comment

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

Why is the dependency problematic?

Copy link
Member Author

Choose a reason for hiding this comment

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

The auto-instrumentation can force loading higher version of System.Diagnostics.DiagnosticSource than the version of the one that app built with. Increasing the dependency of System.Diagnostics.DiagnosticSource can increase the risk of breaking the auto-instrumentation. Here is some related issue talking about similar thing #42244

@tarekgh
Copy link
Member Author

tarekgh commented May 25, 2023

#86567
#77514

Copy link
Member

@noahfalk noahfalk left a comment

Choose a reason for hiding this comment

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

Mostly looked good. I think I spotted two bugs and a few other suggestions inline.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants