Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1984)

Unified Diff: appengine_module/gae_ts_mon/README.md

Issue 1797103003: gae_ts_mon: instrument Cloud Endpoint methods (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Add docs Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | appengine_module/gae_ts_mon/__init__.py » ('j') | appengine_module/gae_ts_mon/config.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine_module/gae_ts_mon/README.md
diff --git a/appengine_module/gae_ts_mon/README.md b/appengine_module/gae_ts_mon/README.md
index 4dc33bbb4f003f09a99fa825a95284156470989d..2054f2562773f75135a6822e36195047a5313807 100644
--- a/appengine_module/gae_ts_mon/README.md
+++ b/appengine_module/gae_ts_mon/README.md
@@ -32,6 +32,10 @@
app.yaml to ensure metrics are registered no matter which type of request
an instance receives first.
+ If your app does not contain a `webapp2.WSGIApplication` instance
+ (e.g. it's a Cloud Endpoints only app), then pass `None` as the
+ first argument to `gae_ts_mon.initialize`.
+
The `gae_ts_mon.initialize` method takes a few optional parameters:
- `cron_module` (str, default='default'): if you specified a custom
module for the cron job, you must specify it in every call to
@@ -42,6 +46,13 @@
metrics flush, and takes effect immediately. Make sure the callback is
efficient, or it will slow down your requests.
+1. Instrument all Cloud Endpoint methods if you have any by adding a decorator:
+
+ @gae_ts_mon.instrument_endpoint()
+ @endpoints.method(...)
+ def your_method(self, request):
+ ...
+
1. Give your app's service account permission to send metrics to the API. You
can find the name of your service account on the `Permissions` page of your
project in the cloud console - it'll look something like
« no previous file with comments | « no previous file | appengine_module/gae_ts_mon/__init__.py » ('j') | appengine_module/gae_ts_mon/config.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698