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

docs(samples): include example writing of label data #202

Merged
merged 2 commits into from
Aug 27, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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