( runtime: SentryRuntimeMode, durationMs: number, )
| 532 | } |
| 533 | |
| 534 | export function recordBootstrapDurationMetric( |
| 535 | runtime: SentryRuntimeMode, |
| 536 | durationMs: number, |
| 537 | ): void { |
| 538 | if (!shouldEmitMetrics()) { |
| 539 | return; |
| 540 | } |
| 541 | |
| 542 | try { |
| 543 | Sentry.metrics.distribution('xcodebuildmcp.bootstrap.duration_ms', Math.max(0, durationMs), { |
| 544 | attributes: { |
| 545 | runtime, |
| 546 | }, |
| 547 | }); |
| 548 | } catch { |
| 549 | // Metrics are best effort and must never affect runtime behavior. |
| 550 | } |
| 551 | } |
| 552 | |
| 553 | export function recordDaemonGaugeMetric(metricName: DaemonGaugeMetricName, value: number): void { |
| 554 | if (!shouldEmitMetrics()) { |
no test coverage detected