Skip to content

Commit

Permalink
Debug log http client response for all requests
Browse files Browse the repository at this point in the history
  • Loading branch information
anmarchenko committed Mar 6, 2024
1 parent 86932a8 commit 309d07a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 0 additions & 4 deletions lib/datadog/ci/test_visibility/transport.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@ def send_traces(traces)

response = send_payload(encoded_payload)

Datadog.logger.debug do
"Received server response: #{response.inspect}"
end

responses << response
end

Expand Down
8 changes: 7 additions & 1 deletion lib/datadog/ci/transport/http.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,17 @@ def request(path:, payload:, headers:, verb: "post")
"compression_enabled=#{compress}; path=#{path}; payload_size=#{payload.size}"
end

ResponseDecorator.new(
response = ResponseDecorator.new(
adapter.call(
build_env(path: path, payload: payload, headers: headers, verb: verb)
)
)

Datadog.logger.debug do
"Received server response: #{response.inspect}"
end

response
end

private
Expand Down
2 changes: 0 additions & 2 deletions lib/datadog/ci/transport/remote_settings_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ def fetch_library_settings(test_session)
payload: request_payload
)

Datadog.logger.debug("Library settings response: #{http_response}")

Response.new(http_response)
end

Expand Down

0 comments on commit 309d07a

Please sign in to comment.