FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Update monitoring region tags by waprin · Pull Request #830 · GoogleCloudPlatform/python-docs-samples · GitHub

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
9 changes: 5 additions & 4 deletions monitoring/api/v3/cloud-client/quickstart.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START monitoring_quickstart]
from google.cloud import monitoring


def run_quickstart():
# [START monitoring_quickstart]
from google.cloud import monitoring

client = monitoring.Client()

resource = client.resource(
Expand All @@ -32,9 +32,10 @@ def run_quickstart():
labels={}
)

# Default arguments use endtime datetime.utcnow()
client.write_point(metric, resource, 3.14)
print('Successfully wrote time series.')
# [END monitoring_quickstart]
# [END monitoring_quickstart]


if __name__ == '__main__':
Expand Down

Back | FazBrowse Home | New Git URL