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

Commit

Permalink
Add region tags for writing time series [(#757)](GoogleCloudPlatform/…
Browse files Browse the repository at this point in the history
  • Loading branch information
waprin authored Jan 12, 2017
1 parent af6ee34 commit 955c923
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions samples/snippets/v3/custom_metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ def get_custom_data_point():
return length


# [START write_timeseries]
def write_timeseries_value(client, project_resource,
custom_metric_type, instance_id, metric_kind):
"""Write the custom metric obtained by get_custom_data_point at a point in
Expand Down Expand Up @@ -136,6 +137,7 @@ def write_timeseries_value(client, project_resource,
request = client.projects().timeSeries().create(
name=project_resource, body={"timeSeries": [timeseries_data]})
request.execute()
# [END write_timeseries]


def read_timeseries(client, project_resource, custom_metric_type):
Expand Down

0 comments on commit 955c923

Please sign in to comment.