Skip to content

Commit

Permalink
feat: remove log rocket (chatwoot#9279)
Browse files Browse the repository at this point in the history
Co-authored-by: Muhsin Keloth <[email protected]>
  • Loading branch information
scmmishra and muhsin-k authored Apr 24, 2024
1 parent 480cf49 commit 12403b7
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 40 deletions.
2 changes: 0 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,6 @@ ANDROID_SHA256_CERT_FINGERPRINT=AC:73:8E:DE:EB:56:EA:CC:10:87:02:A7:65:37:7B:38:
## Sentry
# SENTRY_DSN=

## LogRocket
# LOG_ROCKET_PROJECT_ID=xxxxx/some-project

# MICROSOFT CLARITY
# MS_CLARITY_TOKEN=xxxxxxxxx
Expand Down
7 changes: 0 additions & 7 deletions app/javascript/dashboard/helper/scriptHelpers.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import AnalyticsHelper from './AnalyticsHelper';
import LogRocket from 'logrocket';
import DashboardAudioNotificationHelper from './AudioAlerts/DashboardAudioNotificationHelper';

export const CHATWOOT_SET_USER = 'CHATWOOT_SET_USER';
Expand All @@ -11,12 +10,6 @@ export const ANALYTICS_RESET = 'ANALYTICS_RESET';
export const initializeAnalyticsEvents = () => {
window.bus.$on(ANALYTICS_IDENTITY, ({ user }) => {
AnalyticsHelper.identify(user);
if (window.logRocketProjectId) {
LogRocket.identify(user.id, {
email: user.email,
name: user.name,
});
}
});
};

Expand Down
18 changes: 0 additions & 18 deletions app/javascript/dashboard/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,26 +46,8 @@ import webhooks from './modules/webhooks';
import draftMessages from './modules/draftMessages';
import SLAReports from './modules/SLAReports';

import LogRocket from 'logrocket';
import createPlugin from 'logrocket-vuex';

const plugins = [];

if (window.logRocketProjectId) {
LogRocket.init(window.logRocketProjectId);
// eslint-disable-next-line func-names
const logRocketPlugin = createPlugin(LogRocket, function (mutation) {
const eventsToIgnore = ['SET_CURRENT_USER', 'AUTHENTICATE', 'CLEAR_USER'];
if (eventsToIgnore.includes(mutation.type)) {
return null;
}

return mutation;
});

plugins.push(logRocketPlugin);
}

Vue.use(Vuex);
export default new Vuex.Store({
modules: {
Expand Down
1 change: 0 additions & 1 deletion app/views/layouts/vueapp.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
browser_name: '<%= browser.name %>',
}
window.errorLoggingConfig = '<%= ENV.fetch('SENTRY_DSN', '') %>'
window.logRocketProjectId = '<%= ENV.fetch('LOG_ROCKET_PROJECT_ID', '') %>'
</script>
<% if @global_config['ANALYTICS_TOKEN'].present? %>
<script>
Expand Down
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@
"ionicons": "~2.0.1",
"js-cookie": "^3.0.5",
"libphonenumber-js": "^1.10.24",
"logrocket": "^3.0.1",
"logrocket-vuex": "^0.0.3",
"markdown-it": "^13.0.2",
"markdown-it-link-attributes": "^4.0.1",
"md5": "^2.3.0",
Expand Down
10 changes: 0 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14396,16 +14396,6 @@ loglevel@^1.6.8:
resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.7.1.tgz#005fde2f5e6e47068f935ff28573e125ef72f197"
integrity sha512-Hesni4s5UkWkwCGJMQGAh71PaLUmKFM60dHvq0zi/vDhhrzuk+4GgNbTXJ12YYQJn6ZKBDNIjYcuQGKudvqrIw==

logrocket-vuex@^0.0.3:
version "0.0.3"
resolved "https://registry.yarnpkg.com/logrocket-vuex/-/logrocket-vuex-0.0.3.tgz#e11d65d384f0c9fdac72f984436cc038adf3db90"
integrity sha512-Xnl3pBEkc/bbtZ5JEtFwqNjVuLzVEohlBpyQHP47BlO+/6sFmSM2JcNWojysYUo4cp3IWpmWXcezax2+Cq4RsA==

logrocket@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/logrocket/-/logrocket-3.0.1.tgz#c746e8df3d5fee999b152975e51db1908357a6f0"
integrity sha512-jOWG+jEzobKVxGytzZ+4KGm2kiMQMRTHab2uDWQyVZcHfEF38BlCH1yjQVY4LCmuQUwZitP9biMzJZnyUQ0dtQ==

loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
Expand Down

0 comments on commit 12403b7

Please sign in to comment.