I see. I'm not sure a metric is the right tool for adding up int values 
extracted from your logs. If you always have 1 log entry per frobbing you 
will be able to count the volume, but otherwise you would most likely going 
to need a different system.

On Tuesday, November 21, 2017 at 11:13:52 AM UTC-5, Attila-Mihaly Balazs 
wrote:
>
> Hello Yannick,
>
> Thank you for your reply. Unfortunately it doesn't help me move forward. I 
> think I read all the relevant documentation, searched around on the 
> interwebs and played around with different settings. I *did* mange to set 
> up log based metrics using other information (not the log lines).
>
> However my use-case is the following: let's say that I have the following 
> logging statement in my code:
>
>   logging.info("Frobbed %d widgets", widget_count)
>
> And I would like to set up a log based metric to see how many widgets I 
> frob over time. So I go to log based metrics and try to create a new one:
>
> - in the search box I put "protoPayload.resource:/my/url/that/logs"
> - Name: frobber
> - Add a new label
> - Name: frobber-count
> - Label type: Integer
> - Extraction regular expression: Frobbed (\d+) widgets
> - Field name: <- what to put here?
>
> Again, I tried textPayload and protoPayload.line[0], but neither seem to 
> work.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/9f8cfc30-51a5-4859-a8f4-aebcdc7f69d2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to