Class: Datadog::Contrib::GRPC::Patcher::DeprecatedPin
- Includes:
- DeprecatedPin
- Defined in:
- lib/ddtrace/contrib/grpc/patcher.rb
Overview
Implementation of deprecated Pin, which raises warnings when accessed. To be removed when support for Datadog::Pin with GRPC is removed.
Constant Summary collapse
- DEPRECATION_WARNING =
%( Use of Datadog::Pin with GRPC 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
69 70 71 72 73 |
# File 'lib/ddtrace/contrib/grpc/patcher.rb', line 69 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
65 66 67 |
# File 'lib/ddtrace/contrib/grpc/patcher.rb', line 65 def service_name=(service_name) Datadog.configuration[:grpc][:service_name] = service_name end |
#tracer=(tracer) ⇒ Object
61 62 63 |
# File 'lib/ddtrace/contrib/grpc/patcher.rb', line 61 def tracer=(tracer) Datadog.configuration[:grpc][:tracer] = tracer end |