search: log extra search metadata to NewRelic.
When a user does a tag search, log a few more things, including the normalized search string, the number of tags in the search string, and the number of results.
This commit is contained in:
@@ -12,6 +12,7 @@ class PostsController < ApplicationController
|
||||
tag_query = params[:tags] || params.dig(:post, :tags)
|
||||
@post_set = PostSets::Post.new(tag_query, params[:page], params[:limit], random: params[:random], format: params[:format])
|
||||
@posts = authorize @post_set.posts, policy_class: PostPolicy
|
||||
@post_set.log!
|
||||
respond_with(@posts) do |format|
|
||||
format.atom
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user