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

Issue 1797103003: gae_ts_mon: instrument Cloud Endpoint methods (Closed)

Created:
4 years, 9 months ago by Sergey Berezin
Modified:
4 years, 9 months ago
Reviewers:
dsansome, nodir
CC:
chromium-reviews, infra-reviews+infra_chromium.org
Base URL:
https://chromium.googlesource.com/infra/infra.git@master
Target Ref:
refs/heads/master
Project:
infra
Visibility:
Public.

Description

gae_ts_mon: instrument Cloud Endpoint methods Introducing a decorator to instrument Cloud Endpoints methods. In this version, only status and latency are measured. I'm not yet sure how to extract request & response sizes; they are probably not accurately known at the method level. BUG=570410 R=dsansome@chromium.org,nodir@chromium.org Committed: https://chromium.googlesource.com/infra/infra/+/d6c85d91f53ea782469c4ea76345d522c37077c2

Patch Set 1 #

Patch Set 2 : Add docs #

Total comments: 8

Patch Set 3 : Addressed most comments #

Patch Set 4 : Last comment addressed #

Patch Set 5 : Removed unnecessary 'no cover' #

Total comments: 10

Patch Set 6 : More comments addressed #

Patch Set 7 : Use fake time in shutdown hook test #

Patch Set 8 : Fixed the failing tests #

Patch Set 9 : Rebase #

Patch Set 10 : Fixed the bad rebase #

Patch Set 11 : Reduced test flakiness #

Unified diffs Side-by-side diffs Delta from patch set Stats (+304 lines, -56 lines) Patch
A + appengine/chromium_try_flakes/.expect_tests.cfg View 1 2 3 4 5 6 7 8 9 10 0 chunks +-1 lines, --1 lines 0 comments Download
M appengine/chromium_try_flakes/handlers/test/flake_issues_test.py View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -0 lines 0 comments Download
M appengine/chromium_try_flakes/status/test/cq_status_test.py View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M appengine_module/gae_ts_mon/README.md View 1 2 chunks +11 lines, -0 lines 0 comments Download
M appengine_module/gae_ts_mon/__init__.py View 1 chunk +1 line, -0 lines 0 comments Download
M appengine_module/gae_ts_mon/config.py View 1 2 3 4 5 6 7 8 9 10 6 chunks +83 lines, -34 lines 0 comments Download
M appengine_module/gae_ts_mon/test/config_test.py View 1 2 3 4 5 6 7 8 9 10 6 chunks +130 lines, -18 lines 0 comments Download
M infra_libs/ts_mon/common/http_metrics.py View 1 2 3 4 5 6 7 8 9 1 chunk +21 lines, -0 lines 0 comments Download
M infra_libs/ts_mon/common/interface.py View 1 2 3 4 5 6 7 8 9 10 2 chunks +9 lines, -2 lines 0 comments Download
A infra_libs/ts_mon/common/test/http_metrics_test.py View 1 2 1 chunk +44 lines, -0 lines 0 comments Download
M infra_libs/ts_mon/common/test/interface_test.py View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M infra_libs/ts_mon/common/test/metrics_test.py View 1 2 3 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 24 (10 generated)
Sergey Berezin
PTAL. +nodir, because I borrowed his idea of decorators. I haven't yet tested it on ...
4 years, 9 months ago (2016-03-15 00:25:55 UTC) #1
dsansome
lgtm https://codereview.chromium.org/1797103003/diff/20001/appengine_module/gae_ts_mon/config.py File appengine_module/gae_ts_mon/config.py (right): https://codereview.chromium.org/1797103003/diff/20001/appengine_module/gae_ts_mon/config.py#newcode172 appengine_module/gae_ts_mon/config.py:172: def update_metrics(name, response_status, elapsed_ms, This name is quite ...
4 years, 9 months ago (2016-03-15 02:01:20 UTC) #2
nodir
https://codereview.chromium.org/1797103003/diff/20001/appengine_module/gae_ts_mon/config.py File appengine_module/gae_ts_mon/config.py (right): https://codereview.chromium.org/1797103003/diff/20001/appengine_module/gae_ts_mon/config.py#newcode249 appengine_module/gae_ts_mon/config.py:249: flush_thread.start() check if it is needed in this thread, ...
4 years, 9 months ago (2016-03-15 18:59:49 UTC) #3
Sergey Berezin
Responded to comments, and also tested on an actual app: http://shortn/_CDDiUmmPn0 (code is here: http://crrev.com/1757213002) ...
4 years, 9 months ago (2016-03-17 22:14:04 UTC) #4
nodir
https://codereview.chromium.org/1797103003/diff/80001/appengine_module/gae_ts_mon/config.py File appengine_module/gae_ts_mon/config.py (right): https://codereview.chromium.org/1797103003/diff/80001/appengine_module/gae_ts_mon/config.py#newcode43 appengine_module/gae_ts_mon/config.py:43: def need_to_flush_metrics(time_fn=time.time): I'd add a docstring that this function ...
4 years, 9 months ago (2016-03-18 17:38:02 UTC) #6
Sergey Berezin
PTAL, thanks for great comments! https://codereview.chromium.org/1797103003/diff/80001/appengine_module/gae_ts_mon/config.py File appengine_module/gae_ts_mon/config.py (right): https://codereview.chromium.org/1797103003/diff/80001/appengine_module/gae_ts_mon/config.py#newcode43 appengine_module/gae_ts_mon/config.py:43: def need_to_flush_metrics(time_fn=time.time): On 2016/03/18 ...
4 years, 9 months ago (2016-03-21 18:49:32 UTC) #7
nodir
lgtm
4 years, 9 months ago (2016-03-21 19:16:02 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1797103003/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1797103003/120001
4 years, 9 months ago (2016-03-21 19:23:17 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: Infra Linux Precise 32 Tester on tryserver.infra (JOB_FAILED, https://build.chromium.org/p/tryserver.infra/builders/Infra%20Linux%20Precise%2032%20Tester/builds/1391)
4 years, 9 months ago (2016-03-21 19:28:27 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1797103003/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1797103003/140001
4 years, 9 months ago (2016-03-22 00:28:21 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: Infra Linux Precise 32 Tester on tryserver.infra (JOB_FAILED, https://build.chromium.org/p/tryserver.infra/builders/Infra%20Linux%20Precise%2032%20Tester/builds/1394)
4 years, 9 months ago (2016-03-22 00:33:37 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1797103003/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1797103003/200001
4 years, 9 months ago (2016-03-24 19:43:10 UTC) #21
commit-bot: I haz the power
Committed patchset #11 (id:200001) as https://chromium.googlesource.com/infra/infra/+/d6c85d91f53ea782469c4ea76345d522c37077c2
4 years, 9 months ago (2016-03-24 19:46:30 UTC) #23
Sergiy Byelozyorov
4 years, 9 months ago (2016-03-24 20:09:36 UTC) #24
Message was sent while issue was closed.
A revert of this CL (patchset #11 id:200001) has been created in
https://codereview.chromium.org/1829023003/ by sergiyb@chromium.org.

The reason for reverting is: Breaks all apps with the following error:

Configuration "webapp_django_version" not recognized

Traceback (most recent call last):
  File
"/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py",
line 240, in Handle
    handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
  File
"/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py",
line 299, in _LoadHandler
    handler, path, err = LoadObject(self._handler)
  File
"/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py",
line 85, in LoadObject
    obj = __import__(path[0])
  File
"/base/data/home/apps/s~chromium-try-flakes/3718-78083c5.391607094608479213/main.py",
line 5, in <module>
    import gae_ts_mon
  File
"/base/data/home/apps/s~chromium-try-flakes/3718-78083c5.391607094608479213/gae_ts_mon/__init__.py",
line 38, in <module>
    from infra_libs.ts_mon.config import initialize
  File
"/base/data/home/apps/s~chromium-try-flakes/3718-78083c5.391607094608479213/gae_ts_mon/config.py",
line 14, in <module>
    import endpoints
ImportError: No module named endpoints.

Powered by Google App Engine
This is Rietveld 408576698