UNPKG

panjareh

Version:

Panjareh using aparat and phoenix-video-player to play videos on desktops and tvs.

27 lines (25 loc) 742 B
import * as Sentry from "@sentry/browser"; import { Integrations } from "@sentry/tracing"; import { CaptureConsole } from "@sentry/integrations"; function init(isTV = false, config = {}) { if (process.env.NODE_ENV === "production") { Sentry.init({ dsn: isTV ? process.env.NEXT_PUBLIC_SENTRY_ID_TV : process.env.NEXT_PUBLIC_SENTRY_ID, integrations: [ new Integrations.BrowserTracing(), new CaptureConsole({ levels: ["error"], }), ], release: "panjere@" + process.env.NEXT_PUBLIC_PANJAREH_VERSION, sampleRate: 1, tracesSampleRate: 0.25, autoSessionTracking: true, environment: "production", ...config, }); } } export { init };