Update metrics exporter output to include whether GLOBAL_STATSD is nil

This commit is contained in:
David Dworken 2023-10-22 11:14:25 -07:00
parent 6e1589c1d8
commit 956ac736f2
No known key found for this signature in database

View File

@ -48,7 +48,11 @@ func main() {
for testId, count := range NUM_TEST_RETRIES {
GLOBAL_STATSD.Distribution("test_retry_count", float64(count), []string{"test:" + testId, "os:" + runtime.GOOS}, 1.0)
}
fmt.Printf("Uploaded data about %d tests to datadog\n", len(NUM_TEST_RETRIES))
if GLOBAL_STATSD == nil {
fmt.Printf("Skipped uploading data about %d tests to datadog because GLOBAL_STATSD==nil\n", len(NUM_TEST_RETRIES))
} else {
fmt.Printf("Uploaded data about %d tests to datadog\n", len(NUM_TEST_RETRIES))
}
}
type eventHandler struct{}