Skip to content

Commit

Permalink
Merge pull request #144 from DataDog/anmarchenko/minitest_autorun_iss…
Browse files Browse the repository at this point in the history
…ue_in_readme

add a section on correctly using tracer with minitest/autorun
  • Loading branch information
anmarchenko authored Mar 19, 2024
2 parents 7981912 + a87ef9e commit 409ef05
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,25 @@ if ENV["DD_ENV"] == "ci"
end
```

> [!IMPORTANT]
> When using `minitest/autorun` the order of requires matters: `datadog/ci` must be
> always required before `minitest/autorun`.
Example using `minitest/autorun`

```ruby
require 'datadog/ci'
require 'minitest/autorun'

if ENV["DD_ENV"] == "ci"
Datadog.configure do |c|
c.ci.enabled = true
c.service = 'my-ruby-app'
c.ci.instrument :minitest
end
end
```

`options` are the following keyword arguments:

| Key | Description | Default |
Expand Down

0 comments on commit 409ef05

Please sign in to comment.