fix: bump eventsourced/pg to v2.0.2 and harden startup error logging #851
@@ -66,6 +66,13 @@ func main() {
|
||||
cli,
|
||||
); err != nil {
|
||||
logger.With("error", err).Error("process error")
|
||||
// start() defers the OTel SDK shutdown, so by the time we get here the
|
||||
// log exporter may already be torn down and the line above never
|
||||
// reaches Alloy. Write to stderr too so startup failures are always
|
||||
// visible in `kubectl logs`, and exit non-zero so the container is
|
||||
// reported as failed (CrashLoopBackOff) instead of "Completed".
|
||||
fmt.Fprintf(os.Stderr, "fatal: process error: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user