Skip to content

Commit 12be3be

Browse files
authored
Setup default experimental diagnostic URL (#4130)
1 parent f415a2a commit 12be3be

File tree

72 files changed

+124
-104
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+124
-104
lines changed

Directory.Build.targets

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@
7878
<ItemGroup Condition="'$(Stage)' == 'dev' AND '$(OutputType)' != 'Exe' AND '$(Api)' != 'false'">
7979
<AssemblyAttribute Include="System.Diagnostics.CodeAnalysis.ExperimentalAttribute">
8080
<_Parameter1>TBD</_Parameter1>
81+
<_Parameter2>UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}"</_Parameter2>
82+
<_Parameter2_IsLiteral>true</_Parameter2_IsLiteral>
8183
</AssemblyAttribute>
8284
</ItemGroup>
8385

eng/MSBuild/Shared.props

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
<Project>
2+
<ItemGroup>
3+
<Compile Include="$(MSBuildThisFileDirectory)\..\..\src\Shared\WarningDefinitions.cs" LinkBase="Shared" />
4+
</ItemGroup>
5+
26
<ItemGroup Condition="'$(InjectSharedThrow)' == 'true'">
37
<Compile Include="$(MSBuildThisFileDirectory)\..\..\src\Shared\Throw\*.cs" LinkBase="Shared\Throw" />
48
</ItemGroup>

eng/packages/General.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
<ItemGroup>
7070
<PackageVersion Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.5.22" />
7171
<PackageVersion Include="SonarAnalyzer.CSharp" Version="8.52.0.60960" />
72-
<PackageVersion Include="StyleCop.Analyzers.Unstable" Version="1.2.0.435" />
72+
<PackageVersion Include="StyleCop.Analyzers.Unstable" Version="1.2.0.507" />
7373
</ItemGroup>
7474

7575
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">

src/Libraries/Microsoft.AspNetCore.Telemetry.Middleware/Logging/LoggingOptions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public class LoggingOptions
6767
/// <value>
6868
/// The default value is <see cref="HttpRouteParameterRedactionMode.Strict"/>.
6969
/// </value>
70-
[Experimental(diagnosticId: "TBD", UrlFormat = "TBD")]
70+
[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)]
7171
public HttpRouteParameterRedactionMode RequestPathParameterRedactionMode { get; set; } = DefaultPathParameterRedactionMode;
7272

7373
/// <summary>
@@ -208,7 +208,7 @@ public class LoggingOptions
208208
/// };
209209
/// </code>
210210
/// </example>
211-
[Experimental(diagnosticId: "TBD", UrlFormat = "TBD")]
211+
[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)]
212212
[Required]
213213
[SuppressMessage("Usage", "CA2227:Collection properties should be read only",
214214
Justification = "Options pattern.")]

src/Libraries/Microsoft.AspNetCore.Telemetry/Enrichment.RequestHeaders/RequestHeadersLogEnricherOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public class RequestHeadersLogEnricherOptions
2020
/// Default value is an empty dictionary.
2121
/// </remarks>
2222
[Required]
23-
[Experimental(diagnosticId: "TBD", UrlFormat = "TBD")]
23+
[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)]
2424
#pragma warning disable CA2227 // Collection properties should be read only
2525
public IDictionary<string, DataClassification> HeadersDataClasses { get; set; } = new Dictionary<string, DataClassification>();
2626
#pragma warning restore CA2227 // Collection properties should be read only

src/Libraries/Microsoft.AspNetCore.Telemetry/Tracing/HttpTracingExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public static TracerProviderBuilder AddHttpTraceEnricher(this TracerProviderBuil
116116
/// <param name="services">The <see cref="IServiceCollection"/> to add this enricher.</param>
117117
/// <returns><see cref="IServiceCollection"/> for chaining.</returns>
118118
/// <exception cref="ArgumentNullException">The argument <paramref name="services"/> is <see langword="null"/>.</exception>
119-
[Experimental(diagnosticId: "TBD", UrlFormat = "TBD")]
119+
[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)]
120120
public static IServiceCollection AddHttpTraceEnricher<T>(this IServiceCollection services)
121121
where T : class, IHttpTraceEnricher
122122
{
@@ -132,7 +132,7 @@ public static IServiceCollection AddHttpTraceEnricher<T>(this IServiceCollection
132132
/// <param name="enricher">Enricher to be added.</param>
133133
/// <returns><see cref="TracerProviderBuilder"/> for chaining.</returns>
134134
/// <exception cref="ArgumentNullException">The argument <paramref name="services"/> or <paramref name="enricher"/> is <see langword="null" />.</exception>
135-
[Experimental(diagnosticId: "TBD", UrlFormat = "TBD")]
135+
[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)]
136136
public static IServiceCollection AddHttpTraceEnricher(this IServiceCollection services, IHttpTraceEnricher enricher)
137137
{
138138
_ = Throw.IfNull(services);

src/Libraries/Microsoft.AspNetCore.Telemetry/Tracing/HttpTracingOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public class HttpTracingOptions
5151
/// <remarks>
5252
/// This property is applicable when the <see cref="IncludePath"/> option is enabled.
5353
/// </remarks>
54-
[Experimental(diagnosticId: "TBD", UrlFormat = "TBD")]
54+
[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)]
5555
public HttpRouteParameterRedactionMode RequestPathParameterRedactionMode { get; set; } = DefaultPathParameterRedactionMode;
5656

5757
/// <summary>

src/Libraries/Microsoft.Extensions.AsyncState/IAsyncLocalContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace Microsoft.Extensions.AsyncState;
1111
/// </summary>
1212
/// <typeparam name="T">The type of the asynchronous state.</typeparam>
1313
/// <remarks>This type is intended for internal use. Use <see cref="IAsyncContext{T}"/> instead.</remarks>
14-
[Experimental(diagnosticId: "TBD", UrlFormat = "TBD")]
14+
[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)]
1515
[EditorBrowsable(EditorBrowsableState.Never)]
1616
#pragma warning disable S4023 // Interfaces should not be empty
1717
public interface IAsyncLocalContext<T> : IAsyncContext<T>

src/Libraries/Microsoft.Extensions.Diagnostics.HealthChecks.Common/CommonHealthChecksExtensions.TelemetryPublisher.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public static IServiceCollection AddTelemetryHealthCheckPublisher(this IServiceC
3030
/// <param name="section">Configuration for <see cref="TelemetryHealthCheckPublisherOptions"/>.</param>
3131
/// <returns>The value of <paramref name="services"/>.</returns>
3232
/// <exception cref="ArgumentNullException"><paramref name="services" /> or <paramref name="section"/> are <see langword="null" />.</exception>
33-
[Experimental(diagnosticId: "TBD", UrlFormat = "TBD")]
33+
[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)]
3434
public static IServiceCollection AddTelemetryHealthCheckPublisher(this IServiceCollection services, IConfigurationSection section)
3535
=> Throw.IfNull(services)
3636
.Configure<TelemetryHealthCheckPublisherOptions>(Throw.IfNull(section))
@@ -44,7 +44,7 @@ public static IServiceCollection AddTelemetryHealthCheckPublisher(this IServiceC
4444
/// <param name="configure">Configuration for <see cref="TelemetryHealthCheckPublisherOptions"/>.</param>
4545
/// <returns>The value of <paramref name="services"/>.</returns>
4646
/// <exception cref="ArgumentNullException"><paramref name="services" /> or <paramref name="configure"/> are <see langword="null" />.</exception>
47-
[Experimental(diagnosticId: "TBD", UrlFormat = "TBD")]
47+
[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)]
4848
public static IServiceCollection AddTelemetryHealthCheckPublisher(this IServiceCollection services, Action<TelemetryHealthCheckPublisherOptions> configure)
4949
=> Throw.IfNull(services)
5050
.Configure(Throw.IfNull(configure))

src/Libraries/Microsoft.Extensions.Diagnostics.HealthChecks.Common/TelemetryHealthCheckPublisherOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Microsoft.Extensions.Diagnostics.HealthChecks;
88
/// <summary>
99
/// Options for the telemetry health check publisher.
1010
/// </summary>
11-
[Experimental(diagnosticId: "TBD", UrlFormat = "TBD")]
11+
[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)]
1212
public class TelemetryHealthCheckPublisherOptions
1313
{
1414
/// <summary>

0 commit comments

Comments
 (0)