MCPcopy Index your code
hub / github.com/getsentry/XcodeBuildMCP / loadSentrySync

Function loadSentrySync

src/utils/logger.ts:83–96  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

81let cachedSentry: SentryModule | null = null;
82
83function loadSentrySync(): SentryModule | null {
84 if (!isSentryEnabled() || isTestEnv()) {
85 return null;
86 }
87 if (cachedSentry) {
88 return cachedSentry;
89 }
90 try {
91 cachedSentry = require('@sentry/node') as SentryModule;
92 return cachedSentry;
93 } catch {
94 return null;
95 }
96}
97
98function withSentry(cb: (s: SentryModule) => void): void {
99 const s = loadSentrySync();

Callers 1

withSentryFunction · 0.85

Calls 2

isSentryEnabledFunction · 0.85
isTestEnvFunction · 0.70

Tested by

no test coverage detected