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

Function emitSentrySelfTest

src/utils/sentry.ts:169–194  ·  view source on GitHub ↗
(mode: SentryRuntimeMode | undefined)

Source from the content-addressed store, hash-verified

167 return raw === '1' || raw === 'true' || raw === 'yes';
168}
169function emitSentrySelfTest(mode: SentryRuntimeMode | undefined): void {
170 if (!isSentrySelfTestEnabled() || selfTestEmitted) {
171 return;
172 }
173
174 const marker = new Date().toISOString();
175 const attributes: Record<string, string | number> = {
176 source: 'xcodebuildmcp.sentry_selftest',
177 marker,
178 runtime_mode: mode ?? 'unknown',
179 pid: process.pid,
180 };
181
182 Sentry.logger.info('XcodeBuildMCP Sentry self-test log', attributes);
183 Sentry.startSpan(
184 {
185 name: 'XcodeBuildMCP Sentry self-test transaction',
186 op: 'xcodebuildmcp.sentry_selftest',
187 forceTransaction: true,
188 attributes,
189 },
190 () => undefined,
191 );
192
193 selfTestEmitted = true;
194}
195
196function boolToTag(value: boolean | undefined): string | undefined {
197 if (value === undefined) {

Callers 2

initSentryFunction · 0.85
enrichSentryContextFunction · 0.85

Calls 1

isSentrySelfTestEnabledFunction · 0.85

Tested by

no test coverage detected