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.