Logging is here!

Tracing Ruby Applications

Installation

To begin tracing applications written in Ruby, first install and configure the Datadog Agent.

Next, install the ddtrace gem:

gem install ddtrace

Finally, import the tracer and instrument your code!

Example

require 'ddtrace'

tracer.trace("web.request") do |span|
  span.service = "my_service"
  span.app_type = "web"
  span.set_tag("my_tag", "my_value")
end

For more examples, see the RubyDoc Gem documentation.

Compatibility

Framework Compatibility

The ddtrace library includes support for the following web frameworks:


Library Compatibility

It also includes support for the following libraries:


Further Reading

Additional helpful documentation, links, and articles: