Close dd stats

This commit is contained in:
David Dworken 2023-10-23 19:26:25 -07:00
parent 352e483db5
commit df48e516ef
No known key found for this signature in database
2 changed files with 2 additions and 0 deletions

View File

@ -10,3 +10,4 @@ os.Unsetenv
(*github.com/DataDog/datadog-go/statsd.Client).Incr (*github.com/DataDog/datadog-go/statsd.Client).Incr
(*github.com/DataDog/datadog-go/statsd.Client).Distribution (*github.com/DataDog/datadog-go/statsd.Client).Distribution
(*github.com/schollz/progressbar/v3.ProgressBar).Finish (*github.com/schollz/progressbar/v3.ProgressBar).Finish
(*github.com/DataDog/datadog-go/statsd.Client).Close

View File

@ -28,6 +28,7 @@ func main() {
log.Fatalf("failed to init datadog: %v", err) log.Fatalf("failed to init datadog: %v", err)
} }
} }
defer ddStats.Close()
GLOBAL_STATSD = ddStats GLOBAL_STATSD = ddStats
} else { } else {
fmt.Printf("Skipping exporting test stats to datadog\n") fmt.Printf("Skipping exporting test stats to datadog\n")