(
source: "cache" | "dead_grant" | "no_capability" | "credential_only" | "probe",
result: HealthCheckResult,
previous: HealthCheckResult | null,
)
| 4998 | * the enumerable failure mechanism (`HealthCheckReason`); free-text |
| 4999 | * `detail` still never goes on a span. */ |
| 5000 | const annotateHealthVerdict = ( |
| 5001 | source: "cache" | "dead_grant" | "no_capability" | "credential_only" | "probe", |
| 5002 | result: HealthCheckResult, |
| 5003 | previous: HealthCheckResult | null, |
| 5004 | ): Effect.Effect<void> => |
| 5005 | Effect.annotateCurrentSpan({ |
| 5006 | "executor.health.status": result.status, |
| 5007 | "executor.health.source": source, |
| 5008 | ...(result.httpStatus !== undefined |
| 5009 | ? { "executor.health.http_status": result.httpStatus } |
| 5010 | : {}), |
| 5011 | ...(result.reason !== undefined ? { "executor.health.reason": result.reason } : {}), |
| 5012 | ...(previous !== null |
| 5013 | ? { |
| 5014 | "executor.health.previous_status": previous.status, |
| 5015 | "executor.health.changed": result.status !== previous.status, |
| 5016 | } |
| 5017 | : {}), |
| 5018 | }); |
| 5019 | |
| 5020 | /** Persist a probe verdict unless the grant died while the probe was in |
| 5021 | * flight: a concurrent refresh discovering invalid_grant writes the |
no outgoing calls
no test coverage detected