-
Notifications
You must be signed in to change notification settings - Fork 398
[NO-TICKET] Add logging during configuration initialization #4633
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
Conversation
Datadog ReportBranch report: ✅ 0 Failed, 21055 Passed, 1375 Skipped, 3m 45.06s Total Time |
BenchmarksBenchmark execution time: 2025-05-09 15:26:36 Comparing candidate commit f824299 in PR branch Found 0 performance improvements and 3 performance regressions! Performance is the same for 28 metrics, 2 unstable metrics. scenario:line instrumentation - targeted
scenario:method instrumentation
scenario:profiling - http_transport
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4633 +/- ##
=======================================
Coverage 97.77% 97.77%
=======================================
Files 1415 1415
Lines 86537 86568 +31
Branches 4385 4386 +1
=======================================
+ Hits 84609 84642 +33
+ Misses 1928 1926 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hmm I don't think this change is correct. What other components do to be able to log during initialization is to receive the logger as an argument -- e.g. https://github.com/DataDog/dd-trace-rb/blob/master/lib/datadog/core/configuration/components.rb#L96-L131 . Creating a temporary logger makes it impossible to configure by customers (to e.g. hide messages if they don't want to see them). There were actually a few logs from the profiler that used the temporary logger, and I did get customer questions at least twice on how they can be silenced. |
|
@ivoanjo it already caused some issues for datadog-ci-rb gem that started spewing a lot of debug messages when starting every test session (even without DD_TRACE_DEBUG present), so we need to rethink it before releasing |
|
This PR should fix any issue for datadog-ci-rb, and enable configuring it through the env var |
What does this PR do?
This PR adds a default logger during configuration initialization.
Motivation:
During config initialization, stable config will be able to log errors related to reading or parsing config files. But when doing this, configuration isn't loaded.
logger_without_componentsstill rely on configuration, and will create an infinite loop.Change log entry
None.
Additional Notes:
How to test the change?
CI.