1 write to MetricsTagsFeature
Microsoft.AspNetCore.Hosting (1)
Internal\HostingApplicationDiagnostics.cs (1)
77context.MetricsTagsFeature ??= new HttpMetricsTagsFeature();
17 references to MetricsTagsFeature
Microsoft.AspNetCore.Hosting (11)
Internal\HostingApplication.cs (1)
172MetricsTagsFeature?.Reset();
Internal\HostingApplicationDiagnostics.cs (10)
78httpContext.Features.Set<IHttpMetricsTagsFeature>(context.MetricsTagsFeature); 80context.MetricsTagsFeature.Method = httpContext.Request.Method; 81context.MetricsTagsFeature.Protocol = httpContext.Request.Protocol; 82context.MetricsTagsFeature.Scheme = httpContext.Request.Scheme; 174Debug.Assert(context.MetricsTagsFeature != null, "MetricsTagsFeature should be set if MetricsEnabled is true."); 177var disableHttpRequestDurationMetric = endpoint?.Metadata.GetMetadata<IDisableHttpMetricsMetadata>() != null || context.MetricsTagsFeature.MetricsDisabled; 181context.MetricsTagsFeature.Protocol!, 182context.MetricsTagsFeature.Scheme!, 183context.MetricsTagsFeature.Method!, 188context.MetricsTagsFeature.TagsList,
Microsoft.AspNetCore.Hosting.Tests (6)
HostingApplicationDiagnosticsTests.cs (6)
289Assert.Empty(context.MetricsTagsFeature.TagsList); 290Assert.Null(context.MetricsTagsFeature.Scheme); 291Assert.Null(context.MetricsTagsFeature.Method); 292Assert.Null(context.MetricsTagsFeature.Protocol); 509Assert.True(context.MetricsTagsFeature.MetricsDisabled); 528Assert.False(context.MetricsTagsFeature.MetricsDisabled);