JuanitoFatas / ddtrace-rb-method-wrapper

dd-trace-rb-method-wrapper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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/ruby/#manual-instrumentation

ezoic increase your site revenue

About

dd-trace-rb-method-wrapper

License:MIT License


Languages

Language:Ruby 97.9%Language:Shell 2.1%