For descriptions of terminology used in APM, take a look at the official documentation.
For details about contributing, check out the development guide.
The Ruby APM tracer sends trace data through the Datadog Agent.
ddtrace gem to your Gemfile:
source 'https://rubygems.org' gem 'ddtrace'
Install the gem with
config/initializers/datadog.rb file containing:
require 'ddtrace' Datadog.configure do |c| # This will activate auto-instrumentation for Rails c.use :rails end
You can also activate additional integrations here (see Integration instrumentation)
gem install ddtrace
Add a configuration block to your Ruby application:
require 'ddtrace' Datadog.configure do |c| # Configure the tracer here. # Activate integrations, change tracer settings, etc... # By default without additional configuration, nothing will be traced. end
Add or activate instrumentation by doing either of the following:
Ruby APM includes support for the following Ruby interpreters:
Ruby APM includes support for the following web servers:
|Puma||2.16+ / 3.6+||Fully Supported|
|Unicorn||4.8+ / 5.1+||Fully Supported|
Ruby APM includes support for the following libraries and frameworks:
|Name||Versions Supported||Support type||How to configure|
|Active Model Serializers||
|Net/HTTP||(Any Supported Ruby)||Fully Supported||Link|
Fully Supported support indicates all tracer features are available.
Experimental indicates most features should be available, but unverified.
To activate more advanced features, change tracer behavior, or trace additional code, you must add additional configuration.
APM provides out-of-the-box support for many popular integrations. Although none are active by default, you can easily activate them in
require 'ddtrace' require 'sinatra' require 'active_record' Datadog.configure do |c| c.use :sinatra c.use :active_record end # Now write your code naturally, it's traced automatically. get '/home' do @posts = Posts.order(created_at: :desc).limit(10) erb :index end
For list of available integrations, see Library compatibility.
Tracing is enabled by default. To disable it (i.e. in a test environment):
Datadog.configure do |c| c.tracer enabled: false end
For more tracer settings, check out the API documentation.
The processing pipeline allows you to modify traces before they are sent to the Agent. This can be useful for customizing trace content or removing unwanted traces.
It provides filtering for removing spans that match certain criteria, and processing for modifying spans.
For more details about how to activate and configure the processing pipeline, check out the API documentation.
Additional helpful documentation, links, and articles: