Browse Source

feat: report git revision to sentry

Andelf 2 years ago
parent
commit
c25695d687
1 changed files with 8 additions and 5 deletions
  1. 8 5
      src/main/frontend/modules/instrumentation/sentry.cljs

+ 8 - 5
src/main/frontend/modules/instrumentation/sentry.cljs

@@ -14,11 +14,14 @@
                          version)
    :environment (if config/dev? "development" "production")
    :initialScope {:tags
-                  {:platform (cond
-                               (util/electron?) "electron"
-                               (mobile-util/native-platform?) "mobile"
-                               :else "web")
-                   :publishing config/publishing?}}
+                  (merge
+                   (when (not-empty config/revison)
+                     {:revision config/revison})
+                   {:platform (cond
+                                (util/electron?) "electron"
+                                (mobile-util/native-platform?) "mobile"
+                                :else "web")
+                    :publishing config/publishing?})}
    ;; :integrations [(new posthog/SentryIntegration posthog "logseq" 5311485)
    ;;                (new BrowserTracing)]
    :debug config/dev?