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

Commit

Permalink
fix: add metric label example to the snippet (#509)
Browse files Browse the repository at this point in the history
add code line to set metric label in addition to resource label.
make the code sample align with similar samples in other languages.
  • Loading branch information
minherz authored Oct 28, 2022
1 parent 2fbf507 commit 48b4e35
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions samples/snippets/v3/cloud-client/quickstart.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def run_quickstart(project=""):

series = monitoring_v3.TimeSeries()
series.metric.type = "custom.googleapis.com/my_metric"
series.metric.labels["store_id"] = "Pittsburgh"
series.resource.type = "gce_instance"
series.resource.labels["instance_id"] = "1234567890123456789"
series.resource.labels["zone"] = "us-central1-f"
Expand Down

0 comments on commit 48b4e35

Please sign in to comment.