Skip to content

Commit

Permalink
Don't get clever with multi-targeting or conditional code
Browse files Browse the repository at this point in the history
This narrows the support surface area
  • Loading branch information
chris-peterson committed Apr 25, 2024
1 parent 13a78a3 commit 5bbbc4b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions src/Spiffy.Monitoring.Prometheus/PrometheusProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,23 @@ 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>netstandard2.0</TargetFramework>
<TargetFramework>net6.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.1</Version>
<Version>3.0.2</Version>
<RootNamespace>Spiffy.Monitoring.Prometheus</RootNamespace>
</PropertyGroup>

Expand Down

0 comments on commit 5bbbc4b

Please sign in to comment.