Skip to content

Apis what should i log

Onorio Catenacci edited this page Jul 31, 2013 · 10 revisions

Conveners

Onorio Catenacci (@OldDutchCap)

Use Cases For Logging

  • Debugging
  • Measure Usage
  • Auditing
  • Throttling
  • Defects
  • Security
    • Authentication
  • General Stats
  • Legal

Two Main Flavors of Logging

  • Built-In vs. Custom

What Data Should Be Logged?

  • IP Address
  • Headers
  • Time Stamp
  • Status Code
  • URL
  • Stack trace if possible
  • Code from which the message is being generated
    • Module
    • Line
  • Be careful not to log too much--if you log information you don't need, you'll get overwhelmed by unimportant details
  • Some data should not be logged; confidential e.g. access tokens.

Tools For Logging

Googling for "Open Source Splunk" and you'll turn up lots of good tools

Tools We Build For Custom Logging

  • We want to build our logging tools so they can emit logs that can easily be machine parseable.

How Long Should Logs Be Kept Live?

  • Probably 7 days (or less if you have high volumes of data)
  • After that point, goes into archival storage

Additional Reading

[log2viz: Logs as Data for Performance Visibility] (https://blog.heroku.com/archives/2013/3/19/log2viz)