golang-samples icon indicating copy to clipboard operation
golang-samples copied to clipboard

logging: improve the Write logEntry sample

Open 0xSage opened this issue 3 years ago • 0 comments

Improve the Write logEntry sample on this page

This page is referenced by docs that explicitly talk about LogEntries. So we should demo this “advanced” logging technique, even though we do recommend the standard log wrapper approach in the quickstarts.

Criteria:

  • [ ] Demo how to write a text logEntry (textPayload)
  • [ ] Demo how to write a struct logEntry (jsonPayload)
  • [ ] Include: severity level, labels, resource type (“global”)
  • [ ] Demo: batch logging vs writing one log at a time
  • [ ] Update accompanying tests

Region tag: logging_write_log_entry

0xSage avatar Dec 10 '20 18:12 0xSage