How to Filter the logs based on instance or loading_request using Labels

71 views
Skip to first unread message

Scott Murphy

unread,
Nov 23, 2011, 7:37:10 PM11/23/11
to google-a...@googlegroups.com
I would like to Filter all 500 requests for a specific instance.  Is this possible using labels?

I don't know which label to use for instance and/or loading_request?

The information I want is in the first line of the log

0.1.0.3 - - [23/Nov/2011:16:05:58 -0800] "GET /_ah/warmup HTTP/1.1" 500 0 - - "10.354882841056537036.myapp.appspot.com" ms=68570 cpu_ms=31239 api_cpu_ms=65 cpm_usd=0.867775 loading_request=1 exit_code=104 instance=00c61b117cde1998d024f2dbbd67e9f4d3dc1f

So I want to do something like
status:500, instance:00c61b117cde1998d024f2dbbd67e9f4d3dc1f

but the valid labels are:

Valid labels:
  • day,
  • month,
  • year,
  • hour,
  • minute,
  • second,
  • tzone,
  • remotehost,
  • identd_user,
  • user,
  • status, bytes,
  • referrer,
  • useragent,
  • method,
  • path,
  • querystring,
  • protocol,
  • request_id_hash



Scott Murphy

unread,
Dec 2, 2011, 8:16:51 PM12/2/11
to Google App Engine
Wow, so nobody knows if this is possible?

On Nov 23, 4:37 pm, Scott Murphy <sc...@pixoto.com> wrote:
> I would like to Filter all 500 requests for a specific instance.  Is this
> possible using labels?
>
> I don't know which label to use for instance and/or loading_request?
>
> The information I want is in the first line of the log
>
> 0.1.0.3 - - [23/Nov/2011:16:05:58 -0800] "GET /_ah/warmup HTTP/1.1" 500 0 - - "10.354882841056537036.myapp.appspot.com" ms=68570 cpu_ms=31239 api_cpu_ms=65 cpm_usd=0.867775 loading_request=1 exit_code=104 instance=00c61b117cde1998d024f2dbbd67e9f4d3dc1f
>
> So I want to do something like
> status:500, instance:00c61b117cde1998d024f2dbbd67e9f4d3dc1f
>
> but the valid labels are:
>
> Valid labels:
>

>    - day,
>    - month,
>    - year,
>    - hour,
>    - minute,
>    - second,
>    - tzone,
>    - remotehost,
>    - identd_user,
>    - user,
>    - status, bytes,
>    - referrer,
>    - useragent,
>    - method,
>    - path,
>    - querystring,
>    - protocol,
>    - request_id_hash

Brandon Wirtz

unread,
Dec 2, 2011, 8:29:22 PM12/2/11
to google-a...@googlegroups.com

I think the bigger thing was no one thinks this is worth doing.  What are you going to learn?

 

Using Local Instance memory you need to assign a “Who am I” entity.

I would do this using 24 Adjectives for the Hour of the day, 60 Nouns for the minutes and the seconds of the minute would be a number, and then pick a “place as a random dice roll”

 

Use defined warm up function to start your instance, and the only thing that warm up will do is pick a name for your Instance.

 

Do Warmup would then return

“Hi, I am RedAngel22InTheSky”

 

Or

“Hi, I am PurplePuppy24OnEarth”

 

All logs there after you would prefix with the instance name.

 

You can then search for “RedAngel22InTheSky” in the logs.

 

You may wish to dump logs to data store every so often on a cron as well.

 

If you need a naming convention I can likely dig one up, Hours are A-X (0-23) Minutes are just random things… and Places were always just 10 random choices.   Very low probability of “collisions” unless your app scales by more than 3 instances a second.  The advantage of naming this way is that instances spawned together will have similar prefixes unless you have issues on the change of the hour.

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/O2Ndn_cFnksJ.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.

djidjadji

unread,
Jan 4, 2012, 8:20:10 AM1/4/12
to google-a...@googlegroups.com
If you download the logs you get these extra info labels, and then do
a grep or regex search

Op 24 november 2011 01:37 heeft Scott Murphy <sc...@pixoto.com> het
volgende geschreven:

Reply all
Reply to author
Forward
0 new messages