We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b0417c9 commit 5abc938Copy full SHA for 5abc938
monitoring/api/v3/cloud-client/quickstart.py
@@ -12,11 +12,11 @@
12
# See the License for the specific language governing permissions and
13
# limitations under the License.
14
15
-# [START monitoring_quickstart]
16
-from google.cloud import monitoring
17
-
18
19
def run_quickstart():
+ # [START monitoring_quickstart]
+ from google.cloud import monitoring
+
20
client = monitoring.Client()
21
22
resource = client.resource(
@@ -32,9 +32,10 @@ def run_quickstart():
32
labels={}
33
)
34
35
+ # Default arguments use endtime datetime.utcnow()
36
client.write_point(metric, resource, 3.14)
37
print('Successfully wrote time series.')
-# [END monitoring_quickstart]
38
+ # [END monitoring_quickstart]
39
40
41
if __name__ == '__main__':
0 commit comments