Skip to content

Commit a2ed1a2

Browse files
committed
delete AddLegacyMetrics
1 parent f876b29 commit a2ed1a2

File tree

2 files changed

+1
-23
lines changed

2 files changed

+1
-23
lines changed

src/ApplicationBuilderExtensions.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,7 @@ public static IApplicationBuilder UsePrometheusServer(this IApplicationBuilder a
4242
options.MapPath = "/" + options.MapPath;
4343

4444
if (options.UseDefaultCollectors)
45-
{
46-
#pragma warning disable CS0618
47-
if (options.AddLegacyMetrics)
48-
options.CollectorRegistry.UseDefaultCollectors(options.MetricPrefixName, options.AddLegacyMetrics);
49-
else
50-
options.CollectorRegistry.UseDefaultCollectors(options.MetricPrefixName);
51-
#pragma warning restore CS0618
52-
}
45+
options.CollectorRegistry.UseDefaultCollectors(options.MetricPrefixName);
5346

5447
var contentType = options.ResponseEncoding != null
5548
? $"{Defaults.ContentType}; charset={options.ResponseEncoding.BodyName}"

src/PrometheusOptions.cs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,4 @@ public class PrometheusOptions
3838
/// Metric prefix for Default collectors
3939
/// </summary>
4040
public string MetricPrefixName { get; set; } = string.Empty;
41-
42-
/// <summary>
43-
/// Add legacy metrics to Default collectors
44-
/// </summary>
45-
/// <remarks>
46-
/// Some metrics renamed since v5, <c>AddLegacyMetrics</c> will add old and new name<br />
47-
/// <para>
48-
/// process_virtual_bytes -> process_virtual_memory_bytes<br />
49-
/// process_private_bytes -> process_private_memory_bytes<br />
50-
/// process_working_set -> process_working_set_bytes<br />
51-
/// dotnet_totalmemory -> dotnet_total_memory_bytes
52-
/// </para>
53-
/// </remarks>
54-
[Obsolete("'AddLegacyMetrics' will be removed in future versions")]
55-
public bool AddLegacyMetrics { get; set; }
5641
}

0 commit comments

Comments
 (0)