(
source: "cache" | "dead_grant" | "no_capability" | "credential_only" | "probe",
result: HealthCheckResult,
previous: HealthCheckResult | null,
)
| 4544 | * the enumerable failure mechanism (`HealthCheckReason`); free-text |
| 4545 | * `detail` still never goes on a span. */ |
| 4546 | const annotateHealthVerdict = ( |
| 4547 | source: "cache" | "dead_grant" | "no_capability" | "credential_only" | "probe", |
| 4548 | result: HealthCheckResult, |
| 4549 | previous: HealthCheckResult | null, |
| 4550 | ): Effect.Effect<void> => |
| 4551 | Effect.annotateCurrentSpan({ |
| 4552 | "executor.health.status": result.status, |
| 4553 | "executor.health.source": source, |
| 4554 | ...(result.httpStatus !== undefined |
| 4555 | ? { "executor.health.http_status": result.httpStatus } |
| 4556 | : {}), |
| 4557 | ...(result.reason !== undefined ? { "executor.health.reason": result.reason } : {}), |
| 4558 | ...(previous !== null |
| 4559 | ? { |
| 4560 | "executor.health.previous_status": previous.status, |
| 4561 | "executor.health.changed": result.status !== previous.status, |
| 4562 | } |
| 4563 | : {}), |
| 4564 | }); |
| 4565 | |
| 4566 | /** Persist a probe verdict unless the grant died while the probe was in |
| 4567 | * flight: a concurrent refresh discovering invalid_grant writes the |
no outgoing calls
no test coverage detected