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

[Infra alerting] Use logger callback to defer heavy stringify operations in logger calls #193850

Closed
maryam-saeidi opened this issue Sep 24, 2024 · 2 comments
Labels
Team:obs-ux-management Observability Management User Experience Team

Comments

@maryam-saeidi
Copy link
Member

Summary

In a previous PR, we improved the custom threshold logging by using logger callback and removing unnecessary logging. In this ticket, we would like to do the same for the infra-related rules. (You can find more context in this ticket)

Essentially, for any CPU-intensive processing, we need to use logger callback, here is an example of this change:

State Code
Before logger.trace(Request: ${JSON.stringify({ searches })});
After logger.trace(() => Request: ${JSON.stringify({ searches })});

Here is a list of existing instances in the infra plugin that we need to fix:

Image

@maryam-saeidi maryam-saeidi added the Team:obs-ux-management Observability Management User Experience Team label Sep 24, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-management-team (Team:obs-ux-management)

@maryam-saeidi
Copy link
Member Author

Done in #199805

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:obs-ux-management Observability Management User Experience Team
Projects
None yet
Development

No branches or pull requests

2 participants