I've been trying to update our request logging middleware for falcon to collect data about each request and log it to Stackdriver using the ContainerEngineHandler in the GCP Python module. Right now I set the logging message to json.dumps(log_data), but then it just shows up as the message of the log line and not structured data. Docs and comments in the code constantly refer to "Format the message into JSON expected by fluentd", but it never explicitly states what that format is or where I can find documentation for it. I tried guessing from the Ruby code of the fluentd plugin, but I'm not well verse in Ruby and I couldn't make heads or tails of it.What I would like to do is to write the JSON data as some kind of structured element in the log payload so that we can filter and possibly create metrics around the values in those logs. But I see no clear way to do that. Any ideas?
--
© 2016 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
Email preferences: You received this email because you signed up for the Google Stackdriver Discussion Google Group (google-stackdr...@googlegroups.com) to participate in discussions with other members of the GoogleStackdriver community.
---
You received this message because you are subscribed to the Google Groups "Google Stackdriver Discussion Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-stackdriver-d...@googlegroups.com.
To post to this group, send email to google-stackdr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-stackdriver-discussion/ff63e814-b136-4d31-b49f-705fe03f6d20%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
That's exactly correct. Also, you can enable "detect_json" in the output plugin config (the "match" clause), which will parse serialized JSON written into text logs (e.g., stdout). This option is on by default in some environments (e.g., GKE).Igor
-- sent from a mobile device, please excuse tyops and omissns
On Tue, May 29, 2018, 10:31 PM Chris Foresman <fore...@gmail.com> wrote:
Maybe? I'm not really sure, but I think this my inis implying that I can just build a JSON document with pretty much anything in it, and if anything matches up to the "special" fields they'll be stripped out and inserted in special places, and whatever is left over is left in jsonPayload. Is that right? That sounds like what I'm looking for.
That's the environment we're running in, so perfect. Thank you.
On Tue, May 29, 2018 at 10:00 PM Igor Peshansky <ig...@google.com> wrote:
That's exactly correct. Also, you can enable "detect_json" in the output plugin config (the "match" clause), which will parse serialized JSON written into text logs (e.g., stdout). This option is on by default in some environments (e.g., GKE).Igor
-- sent from a mobile device, please excuse tyops and omissns
On Tue, May 29, 2018, 10:31 PM Chris Foresman <fore...@gmail.com> wrote:
Maybe? I'm not really sure, but I think this my inis implying that I can just build a JSON document with pretty much anything in it, and if anything matches up to the "special" fields they'll be stripped out and inserted in special places, and whatever is left over is left in jsonPayload. Is that right? That sounds like what I'm looking for.
On Tue, May 29, 2018 at 5:34 PM Igor Peshansky <ig...@google.com> wrote:
On Tue, May 29, 2018 at 5:43 PM Chris Foresman <fore...@gmail.com> wrote:
I've been trying to update our request logging middleware for falcon to collect data about each request and log it to Stackdriver using the ContainerEngineHandler in the GCP Python module. Right now I set the logging message to json.dumps(log_data), but then it just shows up as the message of the log line and not structured data. Docs and comments in the code constantly refer to "Format the message into JSON expected by fluentd", but it never explicitly states what that format is or where I can find documentation for it. I tried guessing from the Ruby code of the fluentd plugin, but I'm not well verse in Ruby and I couldn't make heads or tails of it.--What I would like to do is to write the JSON data as some kind of structured element in the log payload so that we can filter and possibly create metrics around the values in those logs. But I see no clear way to do that. Any ideas?
© 2016 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
Email preferences: You received this email because you signed up for the Google Stackdriver Discussion Google Group (google-stackdriver-discu...@googlegroups.com) to participate in discussions with other members of the GoogleStackdriver community.
---
You received this message because you are subscribed to the Google Groups "Google Stackdriver Discussion Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-stackdriver-discussion+unsub...@googlegroups.com.
To post to this group, send email to google-stackdriver-discussion@googlegroups.com.
To post to this group, send email to google-stackdr...@googlegroups.com.