You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(workflows): enhance permissions for future artifact publication and clarify comments
docs(readme): add advanced usage section for route pattern matching and dynamic segment mismatches
docs(metrics): refine build tag guidance for Prometheus and Datadog exporters
fix(eventlogger): clarify ShutdownDrainTimeout behavior for graceful shutdown
Copy file name to clipboardExpand all lines: modules/eventlogger/config.go
+5-6Lines changed: 5 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -41,12 +41,11 @@ type EventLoggerConfig struct {
41
41
// When false, the module will not emit com.modular.eventlogger.stopped to avoid races with shutdown.
42
42
ShutdownEmitStoppedbool`yaml:"shutdownEmitStopped" default:"true" desc:"Emit logger stopped operational event on Stop"`
43
43
44
-
// ShutdownDrainTimeout specifies how long Stop() should wait for in-flight events to drain.
45
-
// Zero or negative duration means "wait indefinitely" (Stop blocks until all events processed).
46
-
// This allows operators to explicitly choose between a bounded shutdown and a fully
47
-
// lossless drain. A very large positive value is NOT treated specially—only <=0 triggers
48
-
// the indefinite behavior.
49
-
ShutdownDrainTimeout time.Duration`yaml:"shutdownDrainTimeout" default:"2s" desc:"Maximum time to wait for draining event queue on Stop. Zero or negative = unlimited wait."`
44
+
// ShutdownDrainTimeout controls graceful shutdown behavior for in‑flight events.
45
+
// If > 0: Stop() waits up to the specified duration then returns (remaining events may be dropped).
46
+
// If <= 0: Stop() waits indefinitely for a full drain (lossless shutdown) unless the parent context cancels.
47
+
// This explicit <= 0 contract avoids ambiguous huge timeouts and lets operators choose bounded vs. lossless.
48
+
ShutdownDrainTimeout time.Duration`yaml:"shutdownDrainTimeout" default:"2s" desc:"Max drain wait on Stop; <=0 = wait indefinitely for all events"`
50
49
}
51
50
52
51
// OutputTargetConfig configures a specific output target for event logs.
0 commit comments