feat: expose effective runtime settings in metrics
This commit is contained in:
@@ -96,6 +96,7 @@ func TestInvalidNumbersAndMonotoneCounters(t *testing.T) {
|
||||
}
|
||||
func TestRuntimeObservationDoesNotExposeErrors(t *testing.T) {
|
||||
r := NewRegistry()
|
||||
r.RecordRuntimeConfig(RuntimeConfig{WorkflowTickInterval: time.Second, ScheduleTickInterval: 1500 * time.Millisecond, RecoveryTickInterval: 2 * time.Second, BatchLimit: 37})
|
||||
r.RecordBatch("workflow", time.Now().Add(-time.Millisecond), nil)
|
||||
r.RecordBatch("workflow", time.Now(), errors.New("private-dsn"))
|
||||
r.RecordBatch("schedule", time.Now(), context.Canceled)
|
||||
@@ -106,6 +107,11 @@ func TestRuntimeObservationDoesNotExposeErrors(t *testing.T) {
|
||||
t.Fatal("missing runtime evidence", want)
|
||||
}
|
||||
}
|
||||
for _, want := range []string{`orbit_runtime_tick_interval_seconds{component="workflow"} 1`, `orbit_runtime_tick_interval_seconds{component="schedule"} 1.5`, `orbit_runtime_tick_interval_seconds{component="execution_recovery"} 2`, "orbit_runtime_batch_limit 37\n"} {
|
||||
if !strings.Contains(out, want) {
|
||||
t.Fatal("missing runtime configuration", want)
|
||||
}
|
||||
}
|
||||
if !strings.Contains(out, `orbit_build_info{go_version="`+runtime.Version()+`",revision="unknown",version="dev"} 1`) {
|
||||
t.Fatal("missing build identity")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user