You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have found that the tracekit.computeStackTrace regular expression misses some stack traces. In some cases, it matches no stack lines, so only uploads the exception message, instead of the trace. In other cases, it misses some stack lines.
Example from a local development environment where the entire stack fails to be matched:
Error: RTE Simulation
at day8$curves$events$handler_COLON_simulate_exception (events.cljs:1060:12)
at eval (std_interceptors.cljc:132:29)
at re_frame$std_interceptors$fx_handler__GT_interceptor_$_fx_handler_before (std_interceptors.cljc:128:19)
at Object.re_frame$interceptor$invoke_interceptor_fn [as invoke_interceptor_fn] (interceptor.cljc:70:6)
at Object.re_frame$interceptor$invoke_interceptors [as invoke_interceptors] (interceptor.cljc:108:24)
at Object.re_frame$interceptor$execute [as execute] (interceptor.cljc:199:8)
at Object.re_frame$events$handle [as handle] (events.cljc:65:14)
at Object.eval [as re_frame$router$IEventQueue$_process_1st_event_in_queue$arity$1] (router.cljc:179:10)
at Object.eval [as re_frame$router$IEventQueue$_run_queue$arity$1] (router.cljc:198:44)
at eval (router.cljc:146:64)
NOTE: in this example, this is not advanced compiled JS from a development environment, so we are not expecting actual source mapping to work, nonetheless, the stack trace should still be logged along with this exception.
Example from release environment, where the stack is uploaded, however, the first two lines of the stack don't match the regex and are excluded.
Error: RTE Simulation
at https://test.curve8.day8.com.au/client/compiled_prod/curves.js:8489:191
at https://test.curve8.day8.com.au/client/compiled_prod/curves.js:5329:312
at ajb (https://test.curve8.day8.com.au/client/compiled_prod/curves.js:5302:157)
at cjb (https://test.curve8.day8.com.au/client/compiled_prod/curves.js:5302:487)
at kjb (https://test.curve8.day8.com.au/client/compiled_prod/curves.js:5315:435)
at jjb (https://test.curve8.day8.com.au/client/compiled_prod/curves.js:5311:600)
at https://test.curve8.day8.com.au/client/compiled_prod/curves.js:5314:246
at i_ (https://test.curve8.day8.com.au/client/compiled_prod/curves.js:5315:295)
at b (https://test.curve8.day8.com.au/client/compiled_prod/curves.js:5312:37)
at b.port1.onmessage (https://test.curve8.day8.com.au/client/compiled_prod/curves.js:5129:235)
NOTE: in this example, the first two lines of the stack are skipped.
Environment
browser-sdk RUM & Logs version 4.11.4
browser Chrome Version 102.0.5005.61 (Official Build) (64-bit)
Host Linux Ubuntu 20.04.4 LTS
The text was updated successfully, but these errors were encountered:
Thank you for reporting this issue. We have resolved it as of v4.16.0.
It appears that our regex struggled to handle cases where:
Anonymous functions are swallowed by the stack trace
example: at https://test.curve8.day8.com.au/client/compiled_prod/curves.js:5314:246)
Filepath does not have a prefix to the path but rather just the target file
example: at day8$curves$events$handler_COLON_simulate_exception (events.cljs:1060:12)
I suspect that the later might be something specific to closureScript, however I was not able to reproduce these traces myself.
Using the examples you provided I was able to add some new edge cases to our unit tests and fix the problem.
I hope this solves your issue. Don't hesitate to open another ticket if you have a specific issue related to the SDK or contact datadog support directly.
We have found that the tracekit.computeStackTrace regular expression misses some stack traces. In some cases, it matches no stack lines, so only uploads the exception message, instead of the trace. In other cases, it misses some stack lines.
Environment
The text was updated successfully, but these errors were encountered: