Module: Datadog::Contrib::MongoDB::Instrumentation::Address::InstanceMethods

Defined in:
lib/ddtrace/contrib/mongodb/instrumentation.rb

Overview

Instance methods for Mongo::Address

Instance Method Summary collapse

Instance Method Details

#datadog_pinObject



50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/ddtrace/contrib/mongodb/instrumentation.rb', line 50

def datadog_pin
  @datadog_pin ||= begin
    tracer = Datadog.configuration[:mongo][:tracer]
    service = Datadog.configuration[:mongo][:service_name]

    Datadog::Pin.new(
      service,
      app: Datadog::Contrib::MongoDB::Ext::APP,
      app_type: Datadog::Ext::AppTypes::DB,
      tracer: tracer
    )
  end
end