Keep run logs opaque and streamline transfers

This commit is contained in:
npc0-hue
2026-09-03 16:40:05 +08:00
parent 48dd540253
commit 330b1c0130
27 changed files with 429 additions and 673 deletions
+2 -2
View File
@@ -60,7 +60,7 @@ func WithMetricCollector(collector MetricCollector) LifecycleExecutorOption {
func (worker *Worker) reportMetricsDegraded(ctx context.Context, trigger string) {
if err := worker.ReportMetricsOnce(ctx); err != nil {
log.Printf("RUN phase=metrics status=degraded trigger=%s error=%s", safeOptional(trigger), RedactText(err.Error()))
log.Printf("RUN phase=metrics status=degraded trigger=%s error=%s", safeOptional(trigger), err.Error())
}
}
@@ -79,7 +79,7 @@ func (worker *Worker) ReportMetricsOnce(ctx context.Context) error {
sample.MemoryPercent = utilization.MemoryPercent
sample.DiskPercent = utilization.DiskPercent
if collectErr != nil {
log.Printf("RUN phase=metrics status=utilization_unavailable error=%s", RedactText(collectErr.Error()))
log.Printf("RUN phase=metrics status=utilization_unavailable error=%s", collectErr.Error())
}
}
reportCtx, cancel := context.WithTimeout(ctx, metricReportTimeout)