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

Diaganostics and metrics clean up #47679

Merged
merged 6 commits into from
Apr 14, 2023
Merged

Diaganostics and metrics clean up #47679

merged 6 commits into from
Apr 14, 2023

Conversation

JamesNK
Copy link
Member

@JamesNK JamesNK commented Apr 13, 2023

Some clean-up from #46834

Made IHttpActivityFeature and IHttpMetricsTagsFeature behave consistently. The "owner" of the features responsible for setting them is hosting. This allows us to have a source of truth implementation which means we can access the underlying List<T> on metrics tags directly instead of going through the feature interface.

Previously hosting would check if the server had an activity feature. Now, if the server sets the feature, it is overridden by hosting. This was probably done for testing. It's a change but very, very unlikely anyone would do this (implement a new server and choose to override IHttpActivityFeature).

@@ -221,8 +257,7 @@ private class TestHttpActivityFeature : IHttpActivityFeature
}

[Fact]
[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/38736")]
Copy link
Member Author

Choose a reason for hiding this comment

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

This quarantined test has been removed.

Comment on lines +241 to +243
using var dummyActivity = dummySource.StartActivity("DummyActivity");
Assert.NotNull(dummyActivity);
Assert.Equal(Activity.Current, dummyActivity);
Copy link
Member Author

Choose a reason for hiding this comment

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

Attempting to narrow down the cause of this flaky test.

@mitchdenny
Copy link
Member

Looks good so far, but will wait to approve until you've finished running down the flakey test.

@JamesNK
Copy link
Member Author

JamesNK commented Apr 14, 2023

Looks good so far, but will wait to approve until you've finished running down the flakey test.

Don't need to hold up merging this.

IHttpActivityFeatureIsPopulated hasn't failed in the last 30 days. I'm adding extra logging/asserts (already done) and then marking the issue as fixed. If there are failures after a month then it can be unqualified.

@JamesNK JamesNK enabled auto-merge (squash) April 14, 2023 06:30
@JamesNK JamesNK merged commit 31d335b into main Apr 14, 2023
26 checks passed
@JamesNK JamesNK deleted the jamesnk/metrics-cleanup branch April 14, 2023 08:04
@ghost ghost added this to the 8.0-preview4 milestone Apr 14, 2023
@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants