]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
write_stackdriver plugin: Log sd_output_register_metric errors.
authorFlorian Forster <octo@google.com>
Thu, 2 Jul 2020 18:23:16 +0000 (20:23 +0200)
committerFlorian Forster <octo@google.com>
Wed, 29 Jul 2020 11:40:03 +0000 (13:40 +0200)
src/write_stackdriver.c

index f540f92f71d3994f9f152e21fb1ae9b10b4bfc08..c77bcb709341b9507b137620319f09dd96957ea8 100644 (file)
@@ -417,7 +417,14 @@ static int wg_metric_descriptors_create(wg_callback_t *cb, metric_t const *m) {
   }
 
   STRBUF_DESTROY(buf);
-  return sd_output_register_metric(cb->formatter, m);
+
+  status = sd_output_register_metric(cb->formatter, m);
+  if (status != 0) {
+    ERROR("write_stackdriver plugin: sd_output_register_metric failed: %s", STRERROR(status));
+    return status;
+  }
+
+  return 0;
 } /* }}} int wg_metric_descriptors_create */
 
 static int wg_output_add(wg_callback_t *cb, metric_t const *m) {