Skip to content

Commit

Permalink
recommend using ignore_request for VCR config
Browse files Browse the repository at this point in the history
  • Loading branch information
anmarchenko committed Apr 23, 2024
1 parent 576d656 commit b1579b2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,10 @@ VCR.configure do |config|
config.ignore_hosts "127.0.0.1", "localhost"

# when using agentless mode
# note to use the correct datadog site (e.g. datadoghq.eu, etc)
config.ignore_hosts "citestcycle-intake.datadoghq.com", "api.datadoghq.com", "citestcov-intake.datadoghq.com"
config.ignore_request do |request|
# ignore all requests to datadoghq hosts
request.uri =~ /datadoghq/
end
end
```

Expand Down
8 changes: 5 additions & 3 deletions docs/UpgradeGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@ For WebMock allow all requests that match datadoghq:
WebMock.disable_net_connect!(:allow => /datadoghq/)
```

For VCR provide a list of Datadog backend hosts as ignored hosts:
For VCR provide `ignore_request` configuration:

```ruby
VCR.configure do |config|
# note to use the correct datadog site (e.g. datadoghq.eu, etc)
config.ignore_hosts "citestcycle-intake.datadoghq.com", "api.datadoghq.com", "citestcov-intake.datadoghq.com"
config.ignore_request do |request|
# ignore all requests to datadoghq hosts
request.uri =~ /datadoghq/
end
end
```

0 comments on commit b1579b2

Please sign in to comment.