Skip to content

Commit b92211d

Browse files
bws0013dandhlee
authored andcommitted
docs(samples): include example writing of label data (#202)
adding label example when writing a timeseries in python Remaking this due to the commit lint failure in #200 and it being easier to just make a new PR. Closing #200. Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [✔️] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/python-monitoring/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [✔️ for linter, unable to run the nox tests because of issues unrelated] Ensure the tests and linter pass - [✔️] Code coverage does not decrease (if any source code was changed) - [✔️, no doc updates required ] Appropriate docs were updated (if necessary) Fixes #200 🦕
1 parent 0d13cca commit b92211d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

monitoring/snippets/v3/cloud-client/snippets.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ def write_time_series(project_id):
6767
series.resource.type = "gce_instance"
6868
series.resource.labels["instance_id"] = "1234567890123456789"
6969
series.resource.labels["zone"] = "us-central1-f"
70+
series.metric.labels["TestLabel"] = "My Label Data"
7071
now = time.time()
7172
seconds = int(now)
7273
nanos = int((now - seconds) * 10 ** 9)

0 commit comments

Comments
 (0)