Skip to content

Commit 6263174

Browse files
committed
refactor!: remove obsolete constructor
1 parent 0b51eb2 commit 6263174

File tree

2 files changed

+1
-22
lines changed

2 files changed

+1
-22
lines changed

src/MetricServer.cs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,6 @@ public class MetricServer : IMetricServer
1818
private readonly MetricServerOptions _options;
1919
private IWebHost _host;
2020

21-
/// <summary>
22-
/// Constructor
23-
/// </summary>
24-
/// <param name="registry">Collector registry </param>
25-
/// <param name="options">Http server configuration options</param>
26-
[Obsolete("Use options.CollectorRegistryInstance for set CollectorRegistry")]
27-
public MetricServer(ICollectorRegistry registry, MetricServerOptions options)
28-
{
29-
options.CollectorRegistryInstance = registry;
30-
31-
if (string.IsNullOrEmpty(options.MapPath) || !options.MapPath.StartsWith("/"))
32-
throw new ArgumentException($"mapPath '{options.MapPath}' should start with '/'");
33-
34-
_options = options;
35-
36-
_options.CollectorRegistryInstance ??= Metrics.DefaultCollectorRegistry;
37-
38-
if (_options.UseDefaultCollectors)
39-
_options.CollectorRegistryInstance.UseDefaultCollectors();
40-
}
41-
4221
/// <summary>
4322
/// Constructor
4423
/// </summary>

src/Prometheus.Client.MetricServer.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<Description>Standalone Kestrel server for the Prometheus.Client</Description>
4-
<VersionPrefix>4.6.0</VersionPrefix>
4+
<VersionPrefix>5.0.0</VersionPrefix>
55
<TargetFrameworks>netstandard2.0;netstandard2.1;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
66
<PackageId>Prometheus.Client.MetricServer</PackageId>
77
<RepositoryUrl>https://github.com/prom-client-net/prom-client-metricserver</RepositoryUrl>

0 commit comments

Comments
 (0)