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, #writer
Instance Method Summary collapse
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
54 55 56 57 58 |
# File 'lib/ddtrace/contrib/dalli/patcher.rb', line 54 def log_deprecation_warning(method_name) do_once(method_name) do Datadog.logger.warn("#{method_name}:#{DEPRECATION_WARNING}") end end |
#service_name=(service_name) ⇒ Object
50 51 52 |
# File 'lib/ddtrace/contrib/dalli/patcher.rb', line 50 def service_name=(service_name) Datadog.configuration[:dalli][:service_name] = service_name end |