File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -338,14 +338,20 @@ See `Monitored resource types`_ for more information about particular monitored
338338
339339 >> > from google.cloud import monitoring
340340 >> > # Create a Resource object for the desired monitored resource type.
341- >> > resource = client.resource(' gce_instance' , labels = {
342- ... ' instance_id' : ' 1234567890123456789' ,
343- ... ' zone' : ' us-central1-f'
344- ... })
341+ >> > resource = client.resource(
342+ ... ' gce_instance' ,
343+ ... labels = {
344+ ... ' instance_id' : ' 1234567890123456789' ,
345+ ... ' zone' : ' us-central1-f'
346+ ... }
347+ ... )
345348 >> > # Create a Metric object, specifying the metric type as well as values for any metric labels.
346- >> > metric = client.metric(type = ' custom.googleapis.com/my_metric' , labels = {
347- ... ' status' : ' successful'
348- ... })
349+ >> > metric = client.metric(
350+ ... type_ = ' custom.googleapis.com/my_metric' ,
351+ ... labels = {
352+ ... ' status' : ' successful'
353+ ... }
354+ ... )
349355
350356 With a ``Metric `` and ``Resource `` in hand, the :class: `~google.cloud.monitoring.client.Client `
351357can be used to write :class: `~google.cloud.monitoring.timeseries.Point ` values.
You can’t perform that action at this time.
0 commit comments