lib/ddtrace/contrib/patcher.rb in ddtrace-0.34.2 vs lib/ddtrace/contrib/patcher.rb in ddtrace-0.35.0
- old
+ new
@@ -26,20 +26,20 @@
do_once(:patch) do
begin
super.tap do
# Emit a metric
- Diagnostics::Health.metrics.instrumentation_patched(1, tags: default_tags)
+ Datadog.health_metrics.instrumentation_patched(1, tags: default_tags)
end
rescue StandardError => e
# Log the error
- Datadog::Logger.log.error("Failed to apply #{patch_name} patch. Cause: #{e} Location: #{e.backtrace.first}")
+ Datadog.logger.error("Failed to apply #{patch_name} patch. Cause: #{e} Location: #{e.backtrace.first}")
# Emit a metric
tags = default_tags
tags << "error:#{e.class.name}"
- Diagnostics::Health.metrics.error_instrumentation_patch(1, tags: tags)
+ Datadog.health_metrics.error_instrumentation_patch(1, tags: tags)
end
end
end
private