Sha256: 9ca1770be1aa6c93e80306878c4007f1f1b24f5a04c79bf7bda5483e67d975fb

Contents?: true

Size: 1.02 KB

Versions: 5

Compression:

Stored size: 1.02 KB

Contents

# Auto Instrumentation

`ddtrace` can automatically instrument all available libraries, without requiring the manual setup of each one.

## Rails

Add the following to your `Gemfile`/`gems.rb` file:

```ruby
source 'https://rubygems.org'
gem 'ddtrace', require: 'ddtrace/auto_instrument'
```

## Ruby

Require `'ddtrace/auto_instrument'` after all gems that you'd like to instrument have been loaded:

```ruby
# Example libraries with supported integrations
require 'sinatra'
require 'faraday'
require 'redis'

require 'ddtrace/auto_instrument'
```

## Additional configuration

You can reconfigure, override, or disable any specific integration settings by adding
a [`Datadog.configure`](GettingStarted.md#integration-instrumentation) call after `ddtrace/auto_instrument` is activated.

## Custom integrations

Custom integrations that want to support auto instrumentation need to be registered
(e.g. invoke their {Datadog::Tracing::Contrib::Registerable::ClassMethods#register_as} method) before
the tracer requires `'ddtrace/auto_instrument'`.

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ddtrace-1.2.0 docs/AutoInstrumentation.md
ddtrace-1.1.0 docs/AutoInstrumentation.md
ddtrace-1.0.0 docs/AutoInstrumentation.md
ddtrace-1.0.0.beta2 docs/AutoInstrumentation.md
ddtrace-1.0.0.beta1 docs/AutoInstrumentation.md