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

Function recordBootstrapDurationMetric

src/utils/sentry.ts:534–551  ·  view source on GitHub ↗
(
  runtime: SentryRuntimeMode,
  durationMs: number,
)

Source from the content-addressed store, hash-verified

532}
533
534export 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
553export function recordDaemonGaugeMetric(metricName: DaemonGaugeMetricName, value: number): void {
554 if (!shouldEmitMetrics()) {

Callers 2

mainFunction · 0.90
mainFunction · 0.90

Calls 1

shouldEmitMetricsFunction · 0.85

Tested by

no test coverage detected