Instrumentation: adding tags to data tracing (#15517)
* Adding tags to data tracing Prior to this commit, the feed's class was part of the resource. That resulted in a more opaque view of things. With this change, we're adding tags to the view so we should have a better sense of filtering. * Bump for license/cla test
This commit is contained in:
parent
42e393af23
commit
c3b2883aa3
2 changed files with 12 additions and 6 deletions
|
|
@ -43,8 +43,10 @@ module Stories
|
|||
else
|
||||
Articles::Feeds::LargeForemExperimental.new(user: current_user, page: @page, tag: params[:tag])
|
||||
end
|
||||
Datadog.tracer.trace("feed.query", span_type: "db",
|
||||
resource: "#{self.class}.#{__method__}.#{feed.class.to_s.dasherize}") do
|
||||
Datadog.tracer.trace("feed.query",
|
||||
span_type: "db",
|
||||
resource: "#{self.class}.#{__method__}",
|
||||
tags: { feed_class: feed.class.to_s.dasherize }) do
|
||||
# Hey, why the to_a you say? Because the
|
||||
# LargeForemExperimental has already done this. But the
|
||||
# weighted strategy has not. I also don't want to alter the
|
||||
|
|
@ -65,8 +67,10 @@ module Stories
|
|||
else
|
||||
Articles::Feeds::LargeForemExperimental.new(user: current_user, page: @page, tag: params[:tag])
|
||||
end
|
||||
Datadog.tracer.trace("feed.query", span_type: "db",
|
||||
resource: "#{self.class}.#{__method__}.#{feed.class.to_s.dasherize}") do
|
||||
Datadog.tracer.trace("feed.query",
|
||||
span_type: "db",
|
||||
resource: "#{self.class}.#{__method__}",
|
||||
tags: { feed_class: feed.class.to_s.dasherize }) do
|
||||
# Hey, why the to_a you say? Because the
|
||||
# LargeForemExperimental has already done this. But the
|
||||
# weighted strategy has not. I also don't want to alter the
|
||||
|
|
|
|||
|
|
@ -250,8 +250,10 @@ class StoriesController < ApplicationController
|
|||
else
|
||||
Articles::Feeds::LargeForemExperimental.new(page: @page, tag: params[:tag])
|
||||
end
|
||||
Datadog.tracer.trace("feed.query", span_type: "db",
|
||||
resource: "#{self.class}.#{__method__}.#{feed.class.to_s.dasherize}") do
|
||||
Datadog.tracer.trace("feed.query",
|
||||
span_type: "db",
|
||||
resource: "#{self.class}.#{__method__}",
|
||||
tags: { feed_class: feed.class.to_s.dasherize }) do
|
||||
# Hey, why the to_a you say? Because the
|
||||
# LargeForemExperimental has already done this. But the
|
||||
# weighted strategy has not. I also don't want to alter the
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue