Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EventCountersListener enables all keywords and all log levels on enabled event sources #4104

Closed
davidfowl opened this issue Jun 22, 2023 · 2 comments · Fixed by #4109
Closed
Assignees

Comments

@davidfowl
Copy link
Member

This leads to high CPU usage which leads to performance problems.
I'm pretty sure it's this line of code coming from the event counter to meter translation layer:

EnableEvents(eventSource, EventLevel.LogAlways, EventKeywords.All, _eventSourceSettings);

It's turning on all of the keywords and all of the event verbosity.

For reference, here's the otel version:

https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/0de8b8a2755b1c5079d369aa63203184703c00c8/src/OpenTelemetry.Instrumentation.EventCounters/EventCountersMetrics.cs#LL197C37-L197C37

We should make these match.

@xakep139
Copy link
Contributor

@dpk83 FYI

@xakep139
Copy link
Contributor

xakep139 commented Jun 23, 2023

@davidfowl, @stephentoub since you were investigating the performance issues, can you please try the fix from #4109?
Or I can do that if you have a benchmark/solution. Thanks!

xakep139 added a commit that referenced this issue Jun 24, 2023
Co-authored-by: Nikita Balabaev <nbalabaev@microsoft.com>
@ghost ghost removed the work in progress 🚧 label Jun 24, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Jul 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants