Add tracing to #to_hash for Comment/CommentThread.
This commit is contained in:
Родитель
1f4b77a9bd
Коммит
925dd72a9d
|
@ -1,3 +1,4 @@
|
||||||
|
require 'new_relic/agent/method_tracer'
|
||||||
require_relative 'content'
|
require_relative 'content'
|
||||||
require_relative 'constants'
|
require_relative 'constants'
|
||||||
|
|
||||||
|
@ -164,4 +165,7 @@ class Comment < Content
|
||||||
self.sk = (self.parent_ids.dup << self.id).join("-")
|
self.sk = (self.parent_ids.dup << self.id).join("-")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
include ::NewRelic::Agent::MethodTracer
|
||||||
|
add_method_tracer :to_hash
|
||||||
end
|
end
|
||||||
|
|
|
@ -133,7 +133,6 @@ class CommentThread < Content
|
||||||
"group_id" => group_id,
|
"group_id" => group_id,
|
||||||
"pinned" => pinned?,
|
"pinned" => pinned?,
|
||||||
"comments_count" => comment_count)
|
"comments_count" => comment_count)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def comment_thread_id
|
def comment_thread_id
|
||||||
|
@ -162,4 +161,7 @@ class CommentThread < Content
|
||||||
def destroy_subscriptions
|
def destroy_subscriptions
|
||||||
subscriptions.delete_all
|
subscriptions.delete_all
|
||||||
end
|
end
|
||||||
|
|
||||||
|
include ::NewRelic::Agent::MethodTracer
|
||||||
|
add_method_tracer :to_hash
|
||||||
end
|
end
|
||||||
|
|
Загрузка…
Ссылка в новой задаче