Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Continue injecting logger #4441

Merged
merged 1 commit into from
Mar 4, 2025
Merged

Continue injecting logger #4441

merged 1 commit into from
Mar 4, 2025

Conversation

p-datadog
Copy link
Member

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

What does this PR do?

Follow up to #4432, this PR continues to inject the logger into classes in dd-trace-rb that currently read the logger from Datadog module directly.

Motivation:

Ability to configure the logger differently for various dd-trace-rb components - for example, to enable verbose logging in DI but not in tracing.
To do so, the logger objects need to be different for the different components, which is not possible when components are referencing the global logger instance.

Change log entry
None

Additional Notes:

How to test the change?
Existing unit tests.

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

github-actions bot commented Feb 26, 2025

Thank you for updating Change log entry section 👏

Visited at: 2025-03-01 05:04:47 UTC

@datadog-datadog-prod-us1
Copy link
Contributor

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

Datadog Report

Branch report: inject-logger-2
Commit report: 7824e43
Test service: dd-trace-rb

✅ 0 Failed, 20614 Passed, 1372 Skipped, 3m 15.1s Total Time

@pr-commenter
Copy link

pr-commenter bot commented Feb 26, 2025

Benchmarks

Benchmark execution time: 2025-03-01 05:23:06

Comparing candidate commit 7824e43 in PR branch inject-logger-2 with baseline commit 987b7a6 in branch master.

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

scenario:profiler - gvl benchmark samples

  • 🟩 throughput [+744.881op/s; +753.961op/s] or [+6.860%; +6.944%]

@codecov-commenter
Copy link

codecov-commenter commented Feb 28, 2025

Codecov Report

Attention: Patch coverage is 98.30508% with 1 line in your changes missing coverage. Please review.

Project coverage is 97.68%. Comparing base (987b7a6) to head (7824e43).

Files with missing lines Patch % Lines
lib/datadog/core/metrics/client.rb 88.88% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4441      +/-   ##
==========================================
- Coverage   97.70%   97.68%   -0.02%     
==========================================
  Files        1374     1374              
  Lines       83807    83809       +2     
  Branches     4249     4249              
==========================================
- Hits        81882    81869      -13     
- Misses       1925     1940      +15     

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

@p-datadog p-datadog marked this pull request as ready for review March 1, 2025 05:04
@p-datadog p-datadog requested review from a team as code owners March 1, 2025 05:04
@p-datadog p-datadog merged commit 374e22a into master Mar 4, 2025
480 checks passed
@p-datadog p-datadog deleted the inject-logger-2 branch March 4, 2025 15:09
@github-actions github-actions bot added this to the 2.13.0 milestone Mar 4, 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.

4 participants