appstats

How do I get appstats to work with webapp2 and extended routing on GAE?

白昼怎懂夜的黑 提交于 2020-01-13 06:26:12
问题 I'm trying to get Appstats to work on my GAE Python app. I'm using webapp2 with python 2.7. I've followed the instructions from https://developers.google.com/appengine/docs/python/tools/appstats#Setup which includes creating the appengine_config.py file: def webapp_add_wsgi_middleware(app): from google.appengine.ext.appstats import recording app = recording.appstats_wsgi_middleware(app) return app And adding the following lines to my app.yaml: builtins: - appstats: on The python app I wish to

NotAllowedError when trying to access AppStats

女生的网名这么多〃 提交于 2020-01-06 04:37:06
问题 After doing everything from here http://code.google.com/appengine/docs/python/tools/appstats.html I get <class 'google.appengine.api.users.NotAllowedError'>: Traceback (most recent call last): File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/appstats/ui.py", line 324, in <module> main() File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/appstats/ui.py", line 320, in main util.run_bare_wsgi_app(app) File "/base/python_runtime/python_lib/versions/1/google

App Engine (python) skips webapp middleware (like Appstats) in production but works fine on dev server

时间秒杀一切 提交于 2019-12-23 07:49:05
问题 I'm using App Engine python to host an application and would love to use Appstats and a couple of other libraries that run as middleware. However, when I set up middleware through appengine_config.py (as shown below) it works on the dev server but not in production. Appstats AND gaesessions work like a charm in the dev server and don't work at all in production. Here is my appengine_config.py, located in my root /src dir: from com.impactpy.gaesessions import SessionMiddleware COOKIE_KEY =

Appstats are only working for one WSGIApplication

大城市里の小女人 提交于 2019-12-19 04:50:44
问题 I've split handlers between 2 python files (main.py and main_cms.py). app.yaml defines the URLs that each python file will handle. When I look at the Appstats, only the handlers from one of the 2 python files are profiled (the ones from main.py). The 'magic' of webapp_add_wsgi_middleware(app) always used to work just fine, until the split. How can I make Appstats recording apply to all handlers? appengine_config.py: def webapp_add_wsgi_middleware(app): from google.appengine.ext.appstats

How to use AppStats with JUnit tests? (Google App Engine)

佐手、 提交于 2019-12-10 22:33:08
问题 I'm implementing a project for Google App Engine. At this moment I have the following setup: I have a couple of servlets in place to will give some data back to a client application (for example Android/iOS client) To test this servlets I created junit tests accessing this servlets. Inside the servlets there is some logic to determine if we are running tests or doing actually calls from a client. If we are running tests on a local machine we initialize a LocalServiceTestHelper to get the

GAE Appstats RPC Timeline graph shows long delays with complex NDB queries

别来无恙 提交于 2019-12-10 12:18:06
问题 I have attached the Appstats from my production app Search page below. The page takes ~45 seconds to load the results by AJAX. There are around 100 entities. The query is as shown below: qry_1 = X.query(ndb.AND(X.active_status=="active", X.property_3==input_3, X.property_4==input_4, X.property_5==input_5, X.property_6.IN(input_6_list), X.property_20.IN(input_20_list))) record_list = qry_1.fetch() # input_6_list contains ~5 string items # input_20_list contains ~5 string items I am not able to

How do I prevent application calling datastore_v3.next() when calling get_multi?

≡放荡痞女 提交于 2019-12-08 08:17:42
问题 I'm running a keys_only query, which fetches 20 results. result_keys, cursor, more = ActivityIndex.query(cls.followers == key)\ .order(-cls.date_created)\ .fetch_page(num_results, start_cursor = cursor, keys_only=True) I then get the parents of the activityIndex objects: keys = [] for k in result_keys: for pair in k.parent().pairs(): keys.append(ndb.Key(pairs=[pair])) activities_related = ndb.get_multi(keys) I thought this would be quick, because I was getting a batch of objects by key.

Google app engine excessive datastore small operations

£可爱£侵袭症+ 提交于 2019-12-08 02:09:51
问题 My site has about 50 users and I am getting excessive small datastore operations. I am aggressively memcaching, dont have that many records and still I get millions of small datastore operations. Appstats says the cost is 0 yet the real cost is not 0. I basically know where the small datastore operations might occur. Key only operations: I do this but I memcache it until the data is not changed. Plus most of my key only operation have limit=100 (this is max) so to get 12m operations I would

Does AppEngine Cloud Trace require AppStats?

戏子无情 提交于 2019-12-07 11:57:02
问题 Google's AppEngine has upgraded their Developer's Console and it includes a monitoring tool called Cloud Trace. Is this an improved version of the AppStats profiling tool? If so, can I remove the configuration files that were previously required, like appengine_config.py and the console path in app.yaml ? builtins: - appstats: on 回答1: Cloud Trace is in beta, meaning "it's not covered by any SLA or deprecation policy and may be subject to backward-incompatible changes", while AppStats is a

Java Appengine APPSTATS causing java out of memory error

倾然丶 夕夏残阳落幕 提交于 2019-12-06 06:35:14
问题 I have several servlets in my java appengine app that do in memory sorting and take on the order of seconds to complete. These complete error free. However, I recently enabled appstats for appengine and started receiving the following error: java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Unknown Source) at java.lang.AbstractStringBuilder.expandCapacity(Unknown Source) at java.lang.AbstractStringBuilder.append(Unknown Source) at java.lang.StringBuilder.append(Unknown