[deploy] Track How Often We Hit Ambiguous Routes (#8098)
This commit is contained in:
parent
4e97623823
commit
0edca1fe2c
2 changed files with 6 additions and 0 deletions
|
|
@ -197,8 +197,10 @@ class ArticlesController < ApplicationController
|
|||
|
||||
def handle_user_or_organization_feed
|
||||
if (@user = User.find_by(username: params[:username]))
|
||||
Honeycomb.add_field("articles_route.user", true)
|
||||
@articles = @articles.where(user_id: @user.id)
|
||||
elsif (@user = Organization.find_by(slug: params[:username]))
|
||||
Honeycomb.add_field("articles_route.org", true)
|
||||
@articles = @articles.where(organization_id: @user.id).includes(:user)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -105,12 +105,16 @@ class StoriesController < ApplicationController
|
|||
@organization = Organization.find_by(slug: params[:username])
|
||||
@page = Page.find_by(slug: params[:username], is_top_level_path: true)
|
||||
if @podcast
|
||||
Honeycomb.add_field("stories_route.podcast", true)
|
||||
handle_podcast_index
|
||||
elsif @organization
|
||||
Honeycomb.add_field("stories_route.org", true)
|
||||
handle_organization_index
|
||||
elsif @page
|
||||
Honeycomb.add_field("stories_route.page", true)
|
||||
handle_page_display
|
||||
else
|
||||
Honeycomb.add_field("stories_route.user", true)
|
||||
handle_user_index
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue