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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃挕 Discard identical logs #2625

Open
valkum opened this issue Feb 27, 2024 · 2 comments
Open

馃挕 Discard identical logs #2625

valkum opened this issue Feb 27, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@valkum
Copy link

valkum commented Feb 27, 2024

Is your feature request related to a problem? Please describe.
Currently, the eventRateLimiterThreshold is hardcoded to 3000 in


We would like to lower this value to avoid logging too many identical errors (e.g. extensions adding icons into input fields which can cause many ResizeObserver loop errors).

Describe the solution you'd like
Add eventRateLimiterThreshold to InitConfiguration

Describe alternatives you've considered
Adding a wrapper around logging functions and our own forwardErrorsToLogs eventHandlers to add similar behavior would work I think, but that would require a bunch of code that isn't really needed. The functionality is already there.

@valkum valkum added the enhancement New feature or request label Feb 27, 2024
@bcaudan
Copy link
Contributor

bcaudan commented Feb 28, 2024

Hi @valkum,

If I understand correctly, you would like to reduce the number of identical log errors.
Another way to do it could be to have an option to automatically drop duplicated logs, maybe during a specific time frame, for example do not send a log that has already seen in the last minute.
Would it be a suitable option for your use case?

In the mean time, it is something that you could achieve through the beforeSend, by keeping track of seen logs and discard further occurrences.

@valkum
Copy link
Author

valkum commented Feb 28, 2024

Drop duplicate logs in the last minute would also be a suitable option.

We will look into adding a workaround using beforeSend for now.

Thanks for your fast response.

@bcaudan bcaudan changed the title 馃挕 Expose eventRateLimiterThreshold in InitConfiguration 馃挕 Discard identical logs Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants