(mode: SentryRuntimeMode | undefined)
| 167 | return raw === '1' || raw === 'true' || raw === 'yes'; |
| 168 | } |
| 169 | function 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 | |
| 196 | function boolToTag(value: boolean | undefined): string | undefined { |
| 197 | if (value === undefined) { |
no test coverage detected