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