Skip to content

Allow suppressing all metrics - #2490

Merged
Trask Stalnaker (trask) merged 3 commits into
mainfrom
allow-suppressing-all-metrics
Sep 14, 2022
Merged

Trask Stalnaker (trask) merged 3 commits into
mainfrom
allow-suppressing-all-metrics

Conversation

@trask

@trask Trask Stalnaker (trask) commented Sep 2, 2022 •

Copy link
Copy Markdown
Member

Resolves #1905

@heyams

Helen (heyams) commented Sep 3, 2022 •

Copy link
Copy Markdown
Contributor

would it be more convenient to turn off one telemetry kind in one kill-switch config? customers need to indicate which ones to exclude.. if they want all of them, that's lots of exclude or regular expressions.

}
}
return false;
return metricFilters.stream().anyMatch(metricFilter -> metricFilter.exclude(metricName));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have noticed that this method is called from a loop in the AgentMetricExporter class. If the number of iterations could be high, I would prefer to avoid creating a stream at each iteration, to limit heap allocation.

@trask
Trask Stalnaker (trask) merged commit 2a38a58 into main Sep 14, 2022
@trask
Trask Stalnaker (trask) deleted the allow-suppressing-all-metrics branch September 14, 2022 17:13
Helen (heyams) pushed a commit that referenced this pull request Sep 16, 2022
* Allow suppressing all metrics

* Remove stream
Helen (heyams) pushed a commit that referenced this pull request Sep 16, 2022
* Allow suppressing all metrics

* Remove stream
Helen (heyams) pushed a commit that referenced this pull request Sep 16, 2022
* Allow suppressing all metrics

* Remove stream
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Turn off customMetrics, performanceCounters and metrics collected by default

3 participants