monitoring: readTimeSeriesValue metric update to 20 minute interval
@@ -86,14 +86,14 @@ func writeTimeSeriesValue(projectID, metricType string) error {
// [START monitoring_read_timeseries_simple]
-// readTimeSeriesValue reads the TimeSeries for the value specified by metric type in a time window from the last 5 minutes.
+// readTimeSeriesValue reads the TimeSeries for the value specified by metric type in a time window from the last 20 minutes.
func readTimeSeriesValue(projectID, metricType string) error {
ctx := context.Background()
c, err := monitoring.NewMetricClient(ctx)
if err != nil {
return err
}
- startTime := time.Now().UTC().Add(time.Minute * -5).Unix()
+ startTime := time.Now().UTC().Add(time.Minute * -20).Unix()
endTime := time.Now().UTC().Unix()
req := &monitoringpb.ListTimeSeriesRequest{
