Skip to content

Commit

Permalink
cleanup and code review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
anmarchenko committed Oct 2, 2023
1 parent 6cc85b6 commit 98b0f06
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 16 deletions.
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ If you are using a cloud CI provider without access to the underlying worker nod
Additionally, configure which [Datadog site](https://docs.datadoghq.com/getting_started/site/) you want to send data to:
`DD_SITE=your.datadoghq.com` (datadoghq.com by default).

Agentless mode can be enabled via `Datadog.configure` (but don't forget to set DD_API_KEY environment variable):
Agentless mode can also be enabled via `Datadog.configure` (but don't forget to set DD_API_KEY environment variable):

```ruby
Datadog.configure { |c| c.ci.agentless_mode_enabled = true }
Expand Down Expand Up @@ -156,8 +156,8 @@ end
require "ddtrace/auto_instrument"
```

Note: in CI mode these traces are going to be submitted to CI visibility backend,
they will **not** be submitted to Datadog APM.
Note: in CI mode these traces are going to be submitted to CI Visibility,
they will **not** show up in Datadog APM.

For the full list of available instrumentations see [ddtrace documentation](https://github.com/DataDog/dd-trace-rb/blob/master/docs/GettingStarted.md)

Expand All @@ -175,14 +175,12 @@ Datadog.configure { |c| c.diagnostics.startup_logs.enabled = false }

Switching the library into debug mode will produce verbose, detailed logs about tracing activity, including any suppressed errors. This output can be helpful in identifying errors, confirming trace output, or catching HTTP transport issues.

You can enable this via `diagnostics.debug = true` or `DD_TRACE_DEBUG`.
You can enable this via `diagnostics.debug = true` or `DD_TRACE_DEBUG=1`.

```ruby
Datadog.configure { |c| c.diagnostics.debug = true }
```

**We do NOT recommend use of this feature in production or other sensitive environments**, as it can be very verbose under load. It's best to use this in a controlled environment where you can control application load.

## Contributing

See [development guide](/docs/DevelopmentGuide.md), [static typing guide](docs/StaticTypingGuide.md) and [contributing guidelines](/CONTRIBUTING.md).
Expand Down
11 changes: 4 additions & 7 deletions lib/datadog/ci/transport/http.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,10 @@ def request(path:, payload:, headers:, method: "post")
payload = Gzip.compress(payload)
end

Datadog.logger.debug { "Sending #{method} request" }
Datadog.logger.debug { "host #{host}" }
Datadog.logger.debug { "port #{port}" }
Datadog.logger.debug { "ssl enabled #{ssl}" }
Datadog.logger.debug { "compression enabled #{compress}" }
Datadog.logger.debug { "path #{path}" }
Datadog.logger.debug { "payload size #{payload.size}" }
Datadog.logger.debug do
"Sending #{method} request: host=#{host}; port=#{port}; ssl_enabled=#{ssl}; " \
"compression_enabled=#{compress}; path=#{path}; payload_size=#{payload.size}"
end

send(method, path: path, payload: payload, headers: headers)
end
Expand Down
3 changes: 0 additions & 3 deletions spec/datadog/ci/configuration/settings_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,6 @@ def patcher
end

context "when not enabled" do
# before do
# allow(integration.configuration).to receive(:enabled).and_return(false)
# end
let(:enabled) { false }

it "does not patch the integration" do
Expand Down

0 comments on commit 98b0f06

Please sign in to comment.