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

Function recordDaemonGaugeMetric

src/utils/sentry.ts:553–568  ·  view source on GitHub ↗
(metricName: DaemonGaugeMetricName, value: number)

Source from the content-addressed store, hash-verified

551}
552
553export function recordDaemonGaugeMetric(metricName: DaemonGaugeMetricName, value: number): void {
554 if (!shouldEmitMetrics()) {
555 return;
556 }
557
558 const normalizedValue = Number.isFinite(value) ? Math.max(0, value) : 0;
559 try {
560 Sentry.metrics.gauge(`xcodebuildmcp.daemon.${metricName}`, normalizedValue, {
561 attributes: {
562 runtime: 'daemon',
563 },
564 });
565 } catch {
566 // Metrics are best effort and must never affect runtime behavior.
567 }
568}
569
570interface McpLifecycleMetric {
571 event: SentryMcpLifecycleEvent;

Callers 2

mainFunction · 0.90
emitRequestGaugesFunction · 0.90

Calls 1

shouldEmitMetricsFunction · 0.85

Tested by

no test coverage detected