Timber for Ruby v2 Released

Enhancements

  1. Timber can now be installed with a simple command: bundle exec timber install. (learn more)
  2. Timber now captures all HTTP request / response headers. This allows you to see a complete list of headers when inspecting requests and responses. (learn more)
  3. params for controller call events are now being captured. This allows you to inspect the parsed paramteres being sent to your controller. (learn more)
  4. Session IDs (context.session.id) are now being captured as part of the context. (learn more)
  5. A number of the Timber integrations were previously using various Rails classes, these have been moved to simple Rack middlewares. This is a cleaner more generic approach.

Bug fixes

  1. User context is now properly captured. In some cases this would not be included on the initial request log line, or captured at all.
  2. Test and development environments will remain untouched and display the plain text logs you're accustomed to. In some cases Timber metadata was seen in these environments. This has been resolved.
  3. Checks for the existence of lograge and resolves the conflict if that gem is installed.

Roadmap

  1. Capturing and logging all outgoing HTTP requests and responses. Helping you track and insepct outgoing HTTP activity. This is something we use internally at Timber that has been immensely helpful, as it simplifies monitoring and debugging communication with external APIs.
  2. Anything you'd like to see? Let us know! Just start a chat below. We love feedback and feature requests.

Upgrading

  1. Bump timber to ~> 2.0 in your Gemfile

    1
    2
    3
     # Gemfile
    
     gem 'timber', '~> 2.0'
    
  2. In your shell, run bundle update timber.

  3. In your shell, run bundle exec timber install your-api-key.

  4. Remove any code you had in place to capture user contexts. As noted above, this issue has been fixed.

  5. Remove the config.logger = call in your config/environments/production.rb. This is now handled in config/initializers/timber.rb.