Skip to content

Commit

Permalink
Republish as netstandard 2.0
Browse files Browse the repository at this point in the history
Otherwise, consuming apps will have a large thread pull in mid-level libraries
  • Loading branch information
chris-peterson committed Apr 24, 2024
1 parent 6f8a58f commit 13a78a3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 4 additions & 0 deletions src/Spiffy.Monitoring.Prometheus/PrometheusProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,27 @@ public static InitializationApi.ProvidersApi Prometheus(this InitializationApi.P
// process_*
SuppressProcessMetrics = false,

#if NET6_0_OR_GREATER
// these are small and useful; always include
// microsoft_aspnetcore_*
// system_runtime_*
// system_net_sockets_*
SuppressEventCounters = false,
#endif

// these are not useful in most (all?) cases; omit by default
// prometheus_net_exemplars_*
// prometheus_net_metric_*
SuppressDebugMetrics = config.SuppressDebugMetrics,

#if NET6_0_OR_GREATER
// these are insanely large (upwards of 10s of GBs); omit by default
// microsoft_aspnetcore_hosting_*
// microsoft_aspnetcore_routing_aspnetcore_routing_match_attempts
// microsoft_aspnetcore_server_kestrel_kestrel_connection_duration
// system_net_http_http_client_*
SuppressMeters = config.SuppressMeters
#endif
};
Metrics.SuppressDefaultMetrics(metricOptions);
api.Add("prometheus", PrometheusRules.Process);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
<Copyright>2020-2024</Copyright>
<Authors>Chris Peterson</Authors>
<Description>The Prometheus provider for Spiffy.Monitoring</Description>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Spiffy.Monitoring.Prometheus</AssemblyName>
<PackageId>Spiffy.Monitoring.Prometheus</PackageId>
<PackageTags>monitoring;eventcontext;structured logging;metrics;prometheus;splunk</PackageTags>
<PackageProjectUrl>http://github.com/chris-peterson/spiffy#overview</PackageProjectUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Version>3.0.0</Version>
<Version>3.0.1</Version>
<RootNamespace>Spiffy.Monitoring.Prometheus</RootNamespace>
</PropertyGroup>

Expand Down
5 changes: 1 addition & 4 deletions tests/TestWebApp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
app.UseRouting();

app.MapGet("/", () => "Hello World!");

app.UseEndpoints(endpoints => {
endpoints.MapMetrics();
});
app.MapMetrics();

app.Run();

0 comments on commit 13a78a3

Please sign in to comment.