Skip to content

Conversation

@p-datadog
Copy link
Member

@p-datadog p-datadog commented Apr 16, 2025

What does this PR do?

Adds an agentless settings resolver, which performs the same function as the agent settings resolver to go from settings/Datadog configuration to agent settings, but for agentless operations (currently only telemetry).

Motivation:
Existing code (telemetry transport) did not have the agent settings resolution as an encapsulated concept. As a result, there was low test coverage for this code and for example the timeout was always fixed at 30 seconds.

With the upcoming PR that will change telemetry to use core transport code, telemetry will need to provide agent settings to the transport even in agentless mode. The agentless settings resolver that this PR adds provides the required bridge.

Change log entry
Yes: improve agentless mode telemetry configuration - it now respects timeout specified for the agent

Additional Notes:

This PR shares the with_env helper with #4588. I originally wrote it for this PR and cherry-picked it into 4588.

How to test the change?
A bunch of tests/assertions are added with this PR.

This PR was also tested as part of the in-progress PR for UDS support (#4630).

@github-actions github-actions bot added the core Involves Datadog core libraries label Apr 16, 2025
@github-actions
Copy link

github-actions bot commented Apr 16, 2025

Thank you for updating Change log entry section 👏

Visited at: 2025-05-08 18:07:25 UTC

@datadog-datadog-prod-us1
Copy link
Contributor

datadog-datadog-prod-us1 bot commented Apr 16, 2025

Datadog Report

Branch report: agentless-resolver
Commit report: fa54149
Test service: dd-trace-rb

✅ 0 Failed, 21239 Passed, 1373 Skipped, 3m 32.8s Total Time

@pr-commenter
Copy link

pr-commenter bot commented Apr 16, 2025

Benchmarks

Benchmark execution time: 2025-05-08 18:26:53

Comparing candidate commit fa54149 in PR branch agentless-resolver with baseline commit 65cb319 in branch master.

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

scenario:profiling - hold / resume

  • 🟩 throughput [+82287.616op/s; +84654.386op/s] or [+5.064%; +5.210%]

@p-datadog p-datadog force-pushed the agentless-resolver branch 4 times, most recently from 4b08513 to e5eba87 Compare April 28, 2025 14:20
@codecov-commenter
Copy link

codecov-commenter commented Apr 28, 2025

Codecov Report

Attention: Patch coverage is 98.85714% with 2 lines in your changes missing coverage. Please review.

Project coverage is 97.76%. Comparing base (65cb319) to head (fa54149).
Report is 270 commits behind head on master.

Files with missing lines Patch % Lines
.../core/configuration/agentless_settings_resolver.rb 98.33% 1 Missing ⚠️
spec/support/core_helpers.rb 88.88% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4590      +/-   ##
==========================================
- Coverage   97.76%   97.76%   -0.01%     
==========================================
  Files        1412     1414       +2     
  Lines       86236    86410     +174     
  Branches     4348     4379      +31     
==========================================
+ Hits        84312    84477     +165     
- Misses       1924     1933       +9     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@p-datadog p-datadog force-pushed the agentless-resolver branch from ab5f384 to 43483bd Compare April 29, 2025 18:00
@p-datadog p-datadog force-pushed the agentless-resolver branch from 43483bd to fa54149 Compare May 8, 2025 18:03
@p-datadog p-datadog marked this pull request as ready for review May 8, 2025 18:03
@p-datadog p-datadog requested a review from a team as a code owner May 8, 2025 18:03
@p-datadog p-datadog merged commit 322d897 into master May 9, 2025
444 checks passed
@p-datadog p-datadog deleted the agentless-resolver branch May 9, 2025 14:18
@github-actions github-actions bot added this to the 2.16.0 milestone May 9, 2025
@Strech Strech mentioned this pull request May 19, 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