Logging is here!

Tracing Ruby Applications


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!


require 'ddtrace'

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

For more examples, see the RubyDoc Gem documentation.


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: