* Add basic Honeycomb initializers * Add some basic instrumentation, capture basic IDs * Correctly alphabetize Gemfile, embed env in dataset names * Actually reorder Gemfile because I can read * Add custom tracing instrumentation to RssReader * Improve timing/tracing info in RssReader * Even make sure Errors show up in trace if possible * Make sure we capture this as Rails traffic * Swap in dev/test Libhoney::Clients as appropriate * Move context-snagging bits into lib/instrumentation.rb * Merging Gemfile lines seems to be my Achilles heel
16 lines
507 B
Ruby
16 lines
507 B
Ruby
class EventsController < ApplicationController
|
|
before_action :set_cache_control_headers, only: [:index]
|
|
# No authorization required for entirely public controller
|
|
|
|
def index
|
|
@events = Event.in_the_future_and_published.sort_by(&:starts_at)
|
|
@past_events = Event.in_the_past_and_published.sort_by(&:starts_at)
|
|
set_surrogate_key_header "events_index_page"
|
|
@past_events.reverse!
|
|
end
|
|
|
|
def show
|
|
@event = Event.find_by(slug: params[:id])
|
|
add_context(event_id: @event.id)
|
|
end
|
|
end
|