From 5abc938c742a35988118119c51deb760851d514d Mon Sep 17 00:00:00 2001 From: Bill Prin Date: Tue, 28 Feb 2017 11:02:27 -0800 Subject: [PATCH] Update monitoring region tags (#830) --- monitoring/api/v3/cloud-client/quickstart.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/monitoring/api/v3/cloud-client/quickstart.py b/monitoring/api/v3/cloud-client/quickstart.py index a899d7615ccd..dd77c7c4bd2e 100644 --- a/monitoring/api/v3/cloud-client/quickstart.py +++ b/monitoring/api/v3/cloud-client/quickstart.py @@ -12,11 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -# [START monitoring_quickstart] -from google.cloud import monitoring - def run_quickstart(): + # [START monitoring_quickstart] + from google.cloud import monitoring + client = monitoring.Client() resource = client.resource( @@ -32,9 +32,10 @@ def run_quickstart(): labels={} ) + # Default arguments use endtime datetime.utcnow() client.write_point(metric, resource, 3.14) print('Successfully wrote time series.') -# [END monitoring_quickstart] + # [END monitoring_quickstart] if __name__ == '__main__':