Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.

Commit 506554d

Browse files
authored
Update reporting period in the example to 60s. (#38)
1 parent 2f26a5d commit 506554d

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

examples/stats/main.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,10 @@ func main() {
5555
}
5656
view.RegisterExporter(exporter)
5757

58-
// Set reporting period to report data at every second.
59-
view.SetReportingPeriod(1 * time.Second)
58+
// Set reporting period to report data at 60 seconds.
59+
// The recommended reporting period by Stackdriver Monitoring is >= 1 minute:
60+
// https://cloud.google.com/monitoring/custom-metrics/creating-metrics#writing-ts.
61+
view.SetReportingPeriod(60 * time.Second)
6062

6163
// Create view to see the processed video size cumulatively.
6264
// Subscribe will allow view data to be exported.

0 commit comments

Comments
 (0)