This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-01-29
Channels
- # announcements (13)
- # aws-lambda (19)
- # babashka (11)
- # beginners (90)
- # calva (35)
- # chlorine-clover (16)
- # cider (8)
- # clj-kondo (6)
- # cljsrn (10)
- # clojure (44)
- # clojure-australia (1)
- # clojure-europe (35)
- # clojure-nl (6)
- # clojure-norway (7)
- # clojure-uk (101)
- # clojurescript (79)
- # community-development (40)
- # conjure (1)
- # contributions-welcome (4)
- # core-logic (2)
- # cursive (6)
- # datomic (4)
- # figwheel-main (5)
- # fulcro (18)
- # girouette (1)
- # graalvm (3)
- # hoplon (2)
- # hugsql (2)
- # jobs (5)
- # malli (26)
- # off-topic (74)
- # pathom (36)
- # portal (4)
- # reagent (10)
- # reitit (23)
- # remote-jobs (1)
- # shadow-cljs (27)
- # spacemacs (10)
- # sql (3)
- # startup-in-a-month (6)
- # tools-deps (55)
- # vim (11)
- # xtdb (15)
Hi! Anyone using Sentry? I'm trying to set it up so I can get somewhat readable stacktraces. I'm using shadow-cljs, with compiler options :source-map
, :pseudo-names
and :pretty-print
(based on what I read https://stackoverflow.com/questions/60543802/get-sourcemapped-source-place-in-browser). So, stacktraces look something like this:
new $cljs$core$PersistentArrayMap$$(null, 1, [$cljs$cst$keyword$style$$, new $cljs$core$PersistentArrayMap$$(null, 4, [$cljs$cst$keyword$f {snip}
$cljs$cst$keyword$text$$, "Login with Facebook", $cljs$cst$keyword$enabled$$, $cljs$core$_EQ_$$.$cljs$core$IFn$_invoke$arity$2$($state$j {snip}
return $re_frame$router$dispatch$$(new $cljs$core$PersistentVector$$(null, 1, 5, $cljs$core$PersistentVector$EMPTY_NODE$$, [$cljs$cst$ke {snip}
}], null)], null), new $cljs$core$PersistentVector$$(null, 2, 5, $cljs$core$PersistentVector$EMPTY_NODE$$, [$myapp$components$login_but {snip}
function() {
throw Error("An error!");
Has anyone managed to do something better?The problem is that react-native metro
post processes the files after shadow-cljs is done with it and has generated the source maps. metro
however doesn't take those source maps into account and generates its own rather useless ones. at least thats how it used to be the last time I looked at this. not sure this has changed.
yes, still open https://github.com/facebook/metro/issues/104
Hi, I’m using Sentry in an app in production. I’m not seeing those issues at all.
> How did I install it?
Pretty vanilla.
Added the dependency in package.json
, then in cljs, required it like ["@sentry/react-native" :as sentry]
and then initialised it with (sentry/init (clj->js my-config...))
where my-config
is just a map of:
{:dsn "some-url-sentry-gives-you"
:debug true-or-false-depends-on-your-needs}
From that point on, you can just use it as: (sentry/captureException (str params))
.
So nothing here that should trip you up. Sentry works as expected.
For :compiler-options
in shadow-cljs.edn
I have :optimizations :simple
not those that you’re using.So we don’t have that many stack traces, most of them are as expected, readable and not in the format as posted above by @franquito
the above is using pseudo-named :advanced
output. :simple
will be much more readable but also quite a bit larger, although thats not super relevant for RN
ahh, totally forgot about simple @dotemacs, thanks. btw, you see clojurescript code in your stack traces? this is what I'm getting with :simple
[myapp.components.header_title,"Login"],null)],null),new cljs.core.PersistentVector(null,5,5,cljs.core.PersistentVector.EMPTY_NODE,[re {snip}
null)],null),new cljs.core.PersistentVector(null,2,5,cljs.core.PersistentVector.EMPTY_NODE,[myapp.components.login_button,new cljs.core.P {snip}
1,5,cljs.core.PersistentVector.EMPTY_NODE,[cljs$cst$keyword$facebook_DASH_login_SLASH_start],null))}],null)],null),new cljs.core.PersistentV {snip}
cljs$cst$keyword$on_DASH_press,function(){throw Error("A :simple error");}],null)],null),new cljs.core.PersistentVector(null,2,5, {snip}
T
Honestly @franquito I’m not seeing that, maybe because all our errors so far have been more on the native (as in ObjC or Swift) side