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

Commit

Permalink
docs(samples): include example writing of label data (#202)
Browse files Browse the repository at this point in the history
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  🦕
  • Loading branch information
bws0013 committed Aug 27, 2021
1 parent b56a78c commit f5e8cf8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions samples/snippets/v3/cloud-client/snippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ def write_time_series(project_id):
series.resource.type = "gce_instance"
series.resource.labels["instance_id"] = "1234567890123456789"
series.resource.labels["zone"] = "us-central1-f"
series.metric.labels["TestLabel"] = "My Label Data"
now = time.time()
seconds = int(now)
nanos = int((now - seconds) * 10 ** 9)
Expand Down

0 comments on commit f5e8cf8

Please sign in to comment.