(metric: InternalErrorMetric)
| 498 | } |
| 499 | |
| 500 | export function recordInternalErrorMetric(metric: InternalErrorMetric): void { |
| 501 | if (!shouldEmitMetrics()) { |
| 502 | return; |
| 503 | } |
| 504 | |
| 505 | try { |
| 506 | Sentry.metrics.count('xcodebuildmcp.internal_error.count', 1, { |
| 507 | attributes: { |
| 508 | component: sanitizeTagValue(metric.component), |
| 509 | runtime: metric.runtime, |
| 510 | error_kind: sanitizeTagValue(metric.errorKind), |
| 511 | }, |
| 512 | }); |
| 513 | } catch { |
| 514 | // Metrics are best effort and must never affect runtime behavior. |
| 515 | } |
| 516 | } |
| 517 | |
| 518 | export function recordDaemonLifecycleMetric(event: SentryDaemonLifecycleEvent): void { |
| 519 | if (!shouldEmitMetrics()) { |
no test coverage detected