-
Notifications
You must be signed in to change notification settings - Fork 477
chore(debugging): guard against race on emitting status #12859
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
We guard the probe registry against potential race conditions when setting the `EMITTING` status. This can happen if a probe that has been instrumented is being deleted, but the instrumentation is triggered in a user thread at around the same time the RC client relies the configuration payload. In this case we simply log the event and do nothing. The better solution would be to lock the registry access, since the handling of the `EMITTING` status exposes the registry to concurrent access. However, we opted for not introducing a lock to avoid adding blocking in-line on user code.
|
|
Co-authored-by: Tyler Finethy <tylfin@gmail.com>
Bootstrap import analysisComparison of import times between this PR and main. SummaryThe average import time in this PR is: 236 ± 3 ms. The average import time in main is: 242 ± 3 ms. The import time difference between this PR and main is: -5.4 ± 0.1 ms. Import time breakdownThe following import paths have shrunk:
|
BenchmarksBenchmark execution time: 2025-03-24 22:03:49 Comparing candidate commit 1b2b72d in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 498 metrics, 2 unstable metrics. |
We guard the probe registry against potential race conditions when setting the
EMITTINGstatus. This can happen if a probe that has been instrumented is being deleted, but the instrumentation is triggered in a user thread at around the same time the RC client relies the configuration payload. In this case we simply log the event and do nothing.The better solution would be to lock the registry access, since the handling of the
EMITTINGstatus exposes the registry to concurrent access. However, we opted for not introducing a lock to avoid adding blocking in-line on user code.Checklist
Reviewer Checklist