Skip to content

Allow suppressing all metrics#2490

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

Allow suppressing all metrics#2490
trask merged 3 commits into
mainfrom
allow-suppressing-all-metrics

Conversation

@trask

@trask trask commented Sep 2, 2022

Copy link
Copy Markdown
Member

Resolves #1905

@trask trask marked this pull request as ready for review September 2, 2022 23:23
@heyams

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 merged commit 2a38a58 into main Sep 14, 2022
@trask trask deleted the allow-suppressing-all-metrics branch September 14, 2022 17:13
heyams pushed a commit that referenced this pull request Sep 16, 2022
* Allow suppressing all metrics

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

* Remove stream
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