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