-
Notifications
You must be signed in to change notification settings - Fork 384
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
DEBUG-3327 DI progress logs #4283
Conversation
Thank you for updating Change log entry section 👏 Visited at: 2025-02-12 18:31:39 UTC |
Datadog ReportBranch report: ❌ 37 Failed (0 Known Flaky), 21910 Passed, 1476 Skipped, 6m 0.48s Total Time ❌ Failed Tests (37)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Current draft looks reasonable, left a small note
73b4959
to
baa571f
Compare
baa571f
to
01eef0d
Compare
Datadog ReportBranch report: ✅ 0 Failed, 22094 Passed, 1477 Skipped, 6m 16.48s Total Time |
d25a59a
to
607ad2b
Compare
6e02e9c
to
300495b
Compare
This reverts commit 21e5d80.
defbf6b
to
be80285
Compare
This PR now adds a Datadog::DI::Logger facade class that defines |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4283 +/- ##
==========================================
- Coverage 97.74% 97.73% -0.01%
==========================================
Files 1351 1352 +1
Lines 82697 82729 +32
Branches 4198 4200 +2
==========================================
+ Hits 80831 80856 +25
- Misses 1866 1873 +7 ☔ View full report in Codecov by Sentry. |
What does this PR do?
Adds logging of dynamic instrumentation operations for troubleshooting: more logging when probes are retrieved from remote config, probes being installed, probes being invoked, events being submitted to the remote worker, remote worker queue size per event type, remote worker working.
Motivation:
Currently when DI is not working there is no effective way to troubleshoot it since to the observer it just looks like nothing is happening. The logging added in this PR permits following DI along its steps to see how far it makes through its process.
Change log entry
Yes: add optional trace logging to dynamic instrumentation
Additional Notes:
The trace logging is conditioned on DD_TRACE_DEBUG environment variable used by the rest of dd-tlrace-rb and also by the newly added internal DI configuration variable. The config variable is intended to be (and is) checked by DI code, but I did not yet want to add another environment variable to enable DI logging specifically because in practice to debug DI we also need to verify that remote config is working, and that uses DD_TRACE_DEBUG.
This PR also adds a Datadog::DI::Logger class which is a facade over the "standard" logger adding a
trace
method. Without this the entire DI test suite would need to have expectations set on the trace output which is a lot of expectations that usually just add overhead for no benefit.How to test the change?