lib/ddtrace/contrib/dalli/instrumentation.rb in ddtrace-0.40.0 vs lib/ddtrace/contrib/dalli/instrumentation.rb in ddtrace-0.41.0
- old
+ new
@@ -1,5 +1,6 @@
+require 'ddtrace/ext/integration'
require 'ddtrace/ext/net'
require 'ddtrace/contrib/analytics'
require 'ddtrace/contrib/dalli/ext'
require 'ddtrace/contrib/dalli/quantize'
@@ -17,9 +18,12 @@
def request(op, *args)
tracer.trace(Datadog::Contrib::Dalli::Ext::SPAN_COMMAND) do |span|
span.resource = op.to_s.upcase
span.service = datadog_configuration[:service_name]
span.span_type = Datadog::Contrib::Dalli::Ext::SPAN_TYPE_COMMAND
+
+ # Tag as an external peer service
+ span.set_tag(Datadog::Ext::Integration::TAG_PEER_SERVICE, span.service)
# Set analytics sample rate
if Contrib::Analytics.enabled?(datadog_configuration[:analytics_enabled])
Contrib::Analytics.set_sample_rate(span, datadog_configuration[:analytics_sample_rate])
end