For quite a few errors (over 50%) it is the case that the stack trace is non-empty but useless and the URL matches the file_uri
An example useless stack trace might look like:
at <anonymous>:1:52 at <anonymous>:1:77
or
at https://he.m.wikipedia.org/wiki/%D7%A7%D7%98%D7%92%D7%95%D7%A8%D7%99%D7%94:%D7%A4%D7%A8%D7%A9%D7%95%D7%AA_%D7%94%D7%A9%D7%91%D7%95%D7%A2:117:30
or
at <anonymous>:1:1
I think as a result we should change the logic and exclude any error in the client where the originating url matches the current location.href or is empty. The stack trace check seems unnecessary. If it's empty, it's usually also associated with a bad file uri.
Examples:
- https://logstash.wikimedia.org/app/kibana#/doc/logstash-*/logstash-2020.08.28/clienterror?id=AXQ1kEBYMQ_08tQaxki8&_g=h@1251ff0
- https://logstash.wikimedia.org/app/kibana#/doc/logstash-*/logstash-2020.08.28/clienterror/?id=AXQ1SF1J3_NNwgAUtRt-
- https://logstash.wikimedia.org/app/kibana#/doc/logstash-*/logstash-2020.08.28/clienterror/?id=AXQ2cSDOMQ_08tQaHfZD
Current logic:
!obj.stackTrace && ( !obj.url || ( obj.url === location.href ) )
Proposed logic:
( !obj.url || obj.url === location.href )