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

Commit 48b4e35

Browse files
authored
fix: add metric label example to the snippet (#509)
add code line to set metric label in addition to resource label. make the code sample align with similar samples in other languages.
1 parent 2fbf507 commit 48b4e35

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

samples/snippets/v3/cloud-client/quickstart.py

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ def run_quickstart(project=""):
2525

2626
series = monitoring_v3.TimeSeries()
2727
series.metric.type = "custom.googleapis.com/my_metric"
28+
series.metric.labels["store_id"] = "Pittsburgh"
2829
series.resource.type = "gce_instance"
2930
series.resource.labels["instance_id"] = "1234567890123456789"
3031
series.resource.labels["zone"] = "us-central1-f"

0 commit comments

Comments
 (0)