Class: Datadog::Contrib::Dalli::Patcher::DeprecatedPin
- Includes:
- DeprecatedPin
- Defined in:
- lib/ddtrace/contrib/dalli/patcher.rb
Overview
Implementation of deprecated Pin, which raises warnings when accessed. To be removed when support for Datadog::Pin with Dalli is removed.
Constant Summary collapse
- DEPRECATION_WARNING =
%( Use of Datadog::Pin with Dalli is DEPRECATED. Upgrade to the configuration API using the migration guide here: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.11.0).freeze
Instance Attribute Summary
Attributes inherited from Pin
#app, #app_type, #config, #name, #service_name, #tags, #tracer
Instance Method Summary collapse
- #log_deprecation_warning(method_name) ⇒ Object
- #service_name=(service_name) ⇒ Object
- #tracer=(tracer) ⇒ Object
Methods included from DeprecatedPin
Methods included from Patcher
Methods included from Patcher::CommonMethods
#do_once, #done?, #without_warnings
Methods inherited from Pin
#enabled?, get_from, #initialize, #onto, #to_s
Constructor Details
This class inherits a constructor from Datadog::Pin
Instance Method Details
#log_deprecation_warning(method_name) ⇒ Object
64 65 66 67 68 |
# File 'lib/ddtrace/contrib/dalli/patcher.rb', line 64 def log_deprecation_warning(method_name) do_once(method_name) do Datadog::Tracer.log.warn("#{method_name}:#{DEPRECATION_WARNING}") end end |
#service_name=(service_name) ⇒ Object
60 61 62 |
# File 'lib/ddtrace/contrib/dalli/patcher.rb', line 60 def service_name=(service_name) Datadog.configuration[:dalli][:service_name] = service_name end |
#tracer=(tracer) ⇒ Object
56 57 58 |
# File 'lib/ddtrace/contrib/dalli/patcher.rb', line 56 def tracer=(tracer) Datadog.configuration[:dalli][:tracer] = tracer end |