stackdriver: call Close on the client
@@ -72,6 +72,11 @@ func main() {
log.Fatalf("Failed to write time series data: %v", err)
}
+ // Closes the client and flushes the data to Stackdriver.
+ if err := client.Close(); err != nil {
+ log.Fatalf("Failed to close client: %v", err)
+ }
+
fmt.Printf("Done writing time series data.\n")
}
