UNPKG

ghl-sentry

Version:
23 lines (22 loc) 967 B
export const FEDERATED_DSN = 'federatedDSN'; export const PROD_ALLOW_URLS = [/https?:\/\/((static|appcdn)\.)?leadconnectorhq\.com/]; export const TESTING_ALLOW_URLS = ['staging.gohighlevel.com', 'localhost']; export const SENTRY_LS_KEY = 'debug_sentry'; export const PROPAGATION_TARGETS = [/https?:\/\/(?!(.*leadconnectorhq\.com\/qr-code\/))(.*)?leadconnectorhq\.com/]; export const TESTING_PROPAGATION_TARGETS = ['localhost', /^\//]; export const ALLOWED_ENV = ['production']; // as i am seeing dev in config export const logDebuggingInfo = (message) => { const canDebug = localStorage.getItem(SENTRY_LS_KEY); if (canDebug) { console.info(`%c SENTRY_DEBUG -- ${message}`, 'color: orange; background: #000;'); } }; export const getWhitelabellingConfig = (env) => { if (env === 'production') { return { allowUrls: PROD_ALLOW_URLS, tracePropagationTargets: PROPAGATION_TARGETS, }; } return {}; };