Skip to content

Conversation

@p-datadog
Copy link
Member

@p-datadog p-datadog commented Feb 13, 2025

What does this PR do?

Adds the causing exception information to InternalErrorResponse class that is used by Remote Config client.

Motivation:

When an error happens, it is currently reported as follows:

E, [2025-02-11T16:00:52.781351 #24] ERROR -- datadog: [datadog] (/usr/local/bundle/gems/datadog-2.9.0/lib/datadog/core/remote/component.rb:53:in `rescue in block in initialize') remote worker error: Datadog::Core::Remote::Client::TransportError #<Datadog::Core::Transport::InternalErrorResponse:0x00007df67ff5b128> location: /usr/local/bundle/gems/datadog-2.9.0/lib/datadog/core/remote/client.rb:34:in `sync'. reseting client state

There is no information as to the actual issue.

With this PR, the report is as follows:

W, [2025-02-13T12:46:53.334734 #645]  WARN -- datadog: [datadog] (/home/w/apps/dd-trace-rb/lib/datadog/core/diagnostics/environment_logger.rb:23:in `log_error!') DATADOG ERROR - TRACING - Agent Error: {"agent_error":"#\u003cDatadog::Core::Transport::InternalErrorResponse:0x00007d68f8d1b918\u003e, error_type:Net::ReadTimeout error:Net::ReadTimeout"}

The reason for the error is included in the end.

Change log entry
Yes: improve remote configuration diagnostic output

Additional Notes:

How to test the change?
Unit test added + I tested manually

@p-datadog p-datadog requested a review from a team as a code owner February 13, 2025 17:59
@github-actions github-actions bot added the core Involves Datadog core libraries label Feb 13, 2025
@datadog-datadog-prod-us1
Copy link
Contributor

datadog-datadog-prod-us1 bot commented Feb 13, 2025

Datadog Report

Branch report: di-rc-diag
Commit report: 15d6619
Test service: dd-trace-rb

✅ 0 Failed, 22094 Passed, 1477 Skipped, 5m 59.61s Total Time

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.65%. Comparing base (44bbcc1) to head (15d6619).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4383      +/-   ##
==========================================
- Coverage   97.66%   97.65%   -0.01%     
==========================================
  Files        1351     1351              
  Lines       82697    82701       +4     
  Branches     4198     4198              
==========================================
  Hits        80764    80764              
- Misses       1933     1937       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pr-commenter
Copy link

pr-commenter bot commented Feb 13, 2025

Benchmarks

Benchmark execution time: 2025-02-13 18:25:24

Comparing candidate commit 15d6619 in PR branch di-rc-diag with baseline commit 44bbcc1 in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 31 metrics, 2 unstable metrics.

@p-datadog p-datadog merged commit b009433 into master Feb 13, 2025
496 checks passed
@p-datadog p-datadog deleted the di-rc-diag branch February 13, 2025 18:46
@github-actions github-actions bot added this to the 2.11.0 milestone Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Involves Datadog core libraries

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants