Skip to content

Commit 9ce1d3f

Browse files
committed
(SUP-4870) Use a case statement for version_based_excludes
Some commentary is also added that explains why various `puppetserver` metrics are excluded.
1 parent 3831f65 commit 9ce1d3f

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

functions/version_based_excludes.pp

+9-5
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@
66
function puppet_metrics_collector::version_based_excludes(
77
String[1] $metrics_type,
88
) >> Array[String] {
9-
if $metrics_type == 'puppetserver' {
10-
['file-sync-storage-service','pe-puppet-profiler','pe-master','pe-jruby-metrics']
11-
}
12-
else {
13-
$excludes = []
9+
case $metrics_type {
10+
'puppetserver': {
11+
# File Sync Storage includes a lot of detail that bloats file sizes.
12+
# The pe-* metrics are legacy representations that only duplicate data.
13+
['file-sync-storage-service','pe-puppet-profiler','pe-master','pe-jruby-metrics']
14+
}
15+
default: {
16+
[]
17+
}
1418
}
1519
}

0 commit comments

Comments
 (0)