Add flush call to metrics exporter so that metrics are flushed before the github action is killed

This commit is contained in:
David Dworken 2023-10-22 18:10:49 -07:00
parent 13233926a7
commit 0413e88321
No known key found for this signature in database

View File

@ -52,6 +52,10 @@ func main() {
if GLOBAL_STATSD == nil {
fmt.Printf("Skipped uploading data about %d tests to datadog because GLOBAL_STATSD==nil\n", len(NUM_TEST_RETRIES))
} else {
err := GLOBAL_STATSD.Flush()
if err != nil {
log.Fatalf("failed to flush metrics: %v", err)
}
fmt.Printf("Uploaded data about %d tests to datadog\n", len(NUM_TEST_RETRIES))
}
}