浏览代码

Fix sentry platform not showing up on issues (#4631)

* Fix sentry platform not showing up as tag

Also added mobile to platform and added publishing as another tag
to allow for more search indices

* Address feedback - mobile platform should be native
Gabriel Horner 3 年之前
父节点
当前提交
6afb0fcdf2
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      src/main/frontend/modules/instrumentation/sentry.cljs

+ 6 - 1
src/main/frontend/modules/instrumentation/sentry.cljs

@@ -15,7 +15,12 @@
                                          :else "")
                                          :else "")
                          version)
                          version)
    :environment (if cfg/dev? "development" "production")
    :environment (if cfg/dev? "development" "production")
-   :platform (if (util/electron?) "electron" "web")
+   :initialScope {:tags
+                  {:platform (cond
+                               (util/electron?) "electron"
+                               (mobile-util/is-native-platform?) "mobile"
+                               :else "web")
+                   :publishing cfg/publishing?}}
    :integrations [(new posthog/SentryIntegration posthog "logseq" 5311485)
    :integrations [(new posthog/SentryIntegration posthog "logseq" 5311485)
                   (new BrowserTracing)]
                   (new BrowserTracing)]
    :debug cfg/dev?
    :debug cfg/dev?