Closed chrisjarman closed 8 months ago
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
Return the Promise from
createTimeSeries
in theexport
method. This allows any thrown exceptions to be to be caught correctly instart
'ssetInterval
callback. This allows consumers of this library to handle errors via theonMetricUploadError
without their process being taken down by an unhandled Promise rejection.N.B. This change does not solve the problem of metrics being delivered more frequently than Stackdriver can handle. The use of
setInterval
is inappropriate. I would recommend usingsetTimeout
instead - waiting for the upload to be complete before scheduling the next attempt.