Closed vitebo closed 4 weeks ago
I don't think Faro should be used to hide logs in the browsers console. Imho it's up to the developers to remove logs before release.
@cedricziel wdyt? Are you aware of any similar requests?
To clarify the problem:
Removing the logs before release means they won’t be available in Grafana.
The goal is to achieve the same behavior as the faro.api.pushLog
API but in a way that is transparent to developers, so they don’t need to change their current logging methods.
Let me clarify, so I do not misunderstand anything:
You want the ConsoleInstrumentation
to capture and send logs but without printing them to the browsers console, right?
Faro only instruments the browser console, sends a log signal and forwards the raw log to the original browser console.
So it sounds the desired functionality is to be able to suppress logs form being printed to the console. This is a concern of logging tools or similar but should not be done by a RUM library.
I understand your point, it really seems to make sense. I think we can consider this issue as resolved then.
Description
Currently, when a log is triggered in the application, it is captured and sent to Alloy by
ConsoleInstrumentation
. The issue is that this log continues to be displayed in the console, making some information more visible than we would prefer.Would it make sense to create an option to prevent this behavior?
Proposed Solution
If an option is created, we can simply add a conditional here.
I am willing to open a PR with this modification if it makes sense.