-
Notifications
You must be signed in to change notification settings - Fork 10k
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
namespace Microsoft.AspNetCore.Http.Metadata; | ||
|
||
public interface IDisableHttpMetricsMetadata | ||
Check failure on line 6 in src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs Azure Pipelines / aspnetcore-ci (Build Build: Linux Musl ARM64)src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs#L6
Check failure on line 6 in src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs Azure Pipelines / aspnetcore-ci (Build Build: Linux Musl ARM64)src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs#L6
Check failure on line 6 in src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs Azure Pipelines / aspnetcore-ci (Build Build: Linux Musl ARM)src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs#L6
Check failure on line 6 in src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs Azure Pipelines / aspnetcore-ci (Build Build: Linux Musl ARM)src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs#L6
Check failure on line 6 in src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs Azure Pipelines / aspnetcore-ci (Build Build: Linux ARM)src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs#L6
Check failure on line 6 in src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs Azure Pipelines / aspnetcore-ci (Build Build: Linux ARM)src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs#L6
Check failure on line 6 in src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs Azure Pipelines / aspnetcore-ci (Build Build: Linux x64)src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs#L6
Check failure on line 6 in src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs Azure Pipelines / aspnetcore-ci (Build Build: Linux x64)src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs#L6
Check failure on line 6 in src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs Azure Pipelines / aspnetcore-quarantined-pr (Tests: Ubuntu x64)src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs#L6
Check failure on line 6 in src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs Azure Pipelines / aspnetcore-quarantined-pr (Tests: Ubuntu x64)src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs#L6
Check failure on line 6 in src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs Azure Pipelines / aspnetcore-ci (Build Test: Ubuntu x64)src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs#L6
Check failure on line 6 in src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs Azure Pipelines / aspnetcore-ci (Build Test: Ubuntu x64)src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs#L6
Check failure on line 6 in src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs Azure Pipelines / aspnetcore-ci (Build Build: Linux Musl x64)src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs#L6
Check failure on line 6 in src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs Azure Pipelines / aspnetcore-ci (Build Build: Linux Musl x64)src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs#L6
Check failure on line 6 in src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs Azure Pipelines / aspnetcore-ci (Build Build: macOS x64)src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs#L6
Check failure on line 6 in src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs Azure Pipelines / aspnetcore-ci (Build Build: macOS x64)src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs#L6
Check failure on line 6 in src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs Azure Pipelines / aspnetcore-ci (Build Build: macOS arm64)src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs#L6
Check failure on line 6 in src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs Azure Pipelines / aspnetcore-ci (Build Build: macOS arm64)src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs#L6
Check failure on line 6 in src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs Azure Pipelines / aspnetcore-ci (Build Build: Linux ARM64)src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs#L6
Check failure on line 6 in src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs Azure Pipelines / aspnetcore-ci (Build Build: Linux ARM64)src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs#L6
Check failure on line 6 in src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs Azure Pipelines / aspnetcore-ci (Build Test: macOS)src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs#L6
Check failure on line 6 in src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs Azure Pipelines / aspnetcore-ci (Build Test: macOS)src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs#L6
Check failure on line 6 in src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs Azure Pipelines / aspnetcore-quarantined-pr (Tests: macOS)src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs#L6
Check failure on line 6 in src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs Azure Pipelines / aspnetcore-quarantined-pr (Tests: macOS)src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs#L6
Check failure on line 6 in src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs Azure Pipelines / aspnetcore-quarantined-prsrc/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs#L6
Check failure on line 6 in src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs Azure Pipelines / aspnetcore-quarantined-prsrc/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs#L6
Check failure on line 6 in src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs Azure Pipelines / aspnetcore-quarantined-prsrc/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs#L6
Check failure on line 6 in src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs Azure Pipelines / aspnetcore-cisrc/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs#L6
Check failure on line 6 in src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs Azure Pipelines / aspnetcore-cisrc/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs#L6
Check failure on line 6 in src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs Azure Pipelines / aspnetcore-cisrc/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs#L6
Check failure on line 6 in src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs Azure Pipelines / aspnetcore-cisrc/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs#L6
|
||
{ | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using Microsoft.AspNetCore.Http.Metadata; | ||
|
||
namespace Microsoft.AspNetCore.Http; | ||
|
||
public sealed class DisableHttpMetricsAttribute : Attribute, IDisableHttpMetricsMetadata | ||
{ | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using Microsoft.AspNetCore.Http; | ||
|
||
namespace Microsoft.AspNetCore.Builder; | ||
|
||
/// <summary> | ||
/// HTTP metrics extension methods for <see cref="IEndpointConventionBuilder"/>. | ||
/// </summary> | ||
public static class HttpMetricsEndpointConventionBuilderExtensions | ||
{ | ||
public static IEndpointConventionBuilder DisableHttpMetrics(this IEndpointConventionBuilder builder, int? statusCode = null) | ||
{ | ||
builder.Add(b => b.Metadata.Add(new DisableHttpMetricsAttribute())); | ||
return builder; | ||
} | ||
} |