-
Notifications
You must be signed in to change notification settings - Fork 97
Use setInterval to upload metrics to Stackdriver periodically #168
Use setInterval to upload metrics to Stackdriver periodically #168
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
|
e6d4593
to
55a3709
Compare
CLAs look good, thanks! |
9921c51
to
a1e32ec
Compare
a1e32ec
to
fdf5893
Compare
return this.createTimeSeriesData(view, measurement); | ||
}); | ||
async uploadViews() { | ||
const timeSeries = [] as TimeSeries[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const timeSeries = [] as TimeSeries[]; | |
const timeSeries: TimeSeries[] = []; |
packages/opencensus-exporter-stackdriver/src/stackdriver-monitoring.ts
Outdated
Show resolved
Hide resolved
packages/opencensus-exporter-stackdriver/src/stackdriver-monitoring.ts
Outdated
Show resolved
Hide resolved
packages/opencensus-exporter-stackdriver/test/test-stackdriver-monitoring.ts
Show resolved
Hide resolved
318cbff
to
5fe2702
Compare
5fe2702
to
3a81f26
Compare
@isaikevych please merge at your leisure. @rueian thanks for the contribution! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you
Fixes #152 |
Hi,
I made some changes to let stackdriver monitoring exporter upload metrics periodically, which are related to issue #152. Including:
setInterval()
to schedule metrics uploading.close()
method which can clear the setInterval timer..onRecord()
and related test cases, because metrics will not be uploaded when.onRecord()
is called..catch()
blocks in some test cases are executed by finishing them with mochadone()
AggregationType.LAST_VALUE
to stackdriverMetricKind.CUMULATIVE
.