Low commit activity in last 3 years
No release in over a year
`ddtrace-method-wrapper` adds convenience methods to Datadog's ruby tracing library `ddtrace`. Extend your classes and modules and wrap their methods with custom datadog tracing.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 3.0
= 0.49.1

Runtime

 Project Readme

Datadog Trace Client Method Wrapper

CircleCI

ddtrace-method-wrapper augments Datadog's tracing library ddtrace for Ruby. It adds a convenience method for classes to wrap method execution in custom tracing.

Getting Started

Load ddtrace_method_wrapper, extend the desired class or module, and specify the methods to trace. The span_type keyword argument is required.

require 'ddtrace_method_wrapper'

class MyInstrumentedClass
  extend DatadogTraceWrapper

  trace :method1, :method2, span_type: 'web'

  def method1
    ...
  end

  def method2
    ...
  end

  # Not instrumented
  def method3
    ...
  end
end

For more specific configuration, Datadog tracing allows for a variety of options which are passed through https://docs.datadoghq.com/tracing/setup_overview/setup/ruby/#manual-instrumentation.