docbrown/config.ru
rhymes 3b4bda89df Upgrade Honeycomb gem, fix and improve RssReader tests (#2319)
* Switch from deprecated honeycomb-rails to honeycomb-beeline

* Improve error handling, tests and add refactoring

* Fix multiple fetching test and add one more

The test wasn't actually testing the correct behavior, because the class
by default force fetches. It worked because it wasn't reloading the user
from the database.

* Test that Honeycomb's client is doing its thing

* Use some defensive programming to avoid any possible problem during shutdown

* Fix typo

* Use the new API to add fields to the current measured event

* Use default instrumentation and add user info to event

* Replace user.email with user.username, less personal data around

* Use mocking instead of calling Honeycomb.init

* Freeze time before traveling

* Remove a flaky test dependent on rand
2019-04-07 15:27:53 -04:00

14 lines
530 B
Ruby

# This file is used by Rack-based servers to start the application.
# Honeycomb must be initialized before the Rails app starts
# see <https://docs.honeycomb.io/getting-data-in/ruby/beeline/> for details
require "honeycomb-beeline"
Honeycomb.init(
writekey: ENV["HONEYCOMB_API_KEY"],
# NOTE: dataset should probably be set using "HONEYCOMB_DATASET" env,
# to avoid hardcoding "dev.to" as a name
dataset: "dev.to-#{ENV['RAILS_ENV']}",
)
require ::File.expand_path("../config/environment", __FILE__)
run Rails.application