Skip to content

EXPERIMENT: Defer starting DebuggerAgent until shared comms is ready#11378

Draft
mcculls wants to merge 1 commit into
masterfrom
mcculls/hold-back-dbg-upload-until-sco-ready
Draft

EXPERIMENT: Defer starting DebuggerAgent until shared comms is ready#11378
mcculls wants to merge 1 commit into
masterfrom
mcculls/hold-back-dbg-upload-until-sco-ready

Conversation

@mcculls
Copy link
Copy Markdown
Contributor

@mcculls mcculls commented May 15, 2026

Motivation

In certain environments we need to hold back shared-communication over OkHttp because it may trigger early loading of things like JUL which can break apps that expect to set a custom log manager.

At the moment we do this via SharedCommunicationObjects::whenReady - if comms is allowed the call goes ahead immediately, otherwise it is temporarily delayed until we know it is safe to proceed. This mechanism will hopefully be replaced eventually by a run-level style approach, but until then any services that are on by default and might use OkHttp should use this method to co-operate with the overall Agent startup.

The DebuggerAgent has been gradually enabling more and more features by default, including recently source file tracking and symbol uploads. Since these may call out using OkHttp they should use SharedCommunicationObjects::whenReady. Given the current codebase structure the easiest way to apply this was on the main DebuggerAgent::run method.

Contributor Checklist

Jira ticket: [PROJ-IDENT]

Note: Once your PR is ready to merge, add it to the merge queue by commenting /merge. /merge -c cancels the queue request. /merge -f --reason "reason" skips all merge queue checks; please use this judiciously, as some checks do not run at the PR-level. For more information, see this doc.

In certain environments we need to hold back shared-communication over OkHttp
because it may trigger early loading of things like JUL which can break apps
that expect to set a custom log manager.

At the moment we do this via SharedCommunicationObjects::whenReady - if comms
is allowed the call goes ahead immediately, otherwise it is temporarily delayed
until we know it is safe to proceed. This mechanism will hopefully be replaced
eventually by a run-level style approach, but until then any services that are
on by default and might use OkHttp should use this method to co-operate with
the overall Agent startup.

The DebuggerAgent has been gradually enabling more and more features by default,
including recently source file tracking and symbol uploads. Since these may call
out using OkHttp they should use SharedCommunicationObjects::whenReady. Given
the current codebase structure the easiest way to apply this was on the main
DebuggerAgent::run method.
@mcculls mcculls added type: feature request tag: no release notes Changes to exclude from release notes comp: debugger Dynamic Instrumentation labels May 15, 2026
@mcculls mcculls changed the title Defer starting DebuggerAgent until shared comms is ready. Defer starting DebuggerAgent until shared comms is ready May 15, 2026
@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented May 15, 2026

Debugger benchmarks

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
ci_job_date 1778854328 1778854674
end_time 2026-05-15T14:13:32 2026-05-15T14:19:19
git_branch master mcculls/hold-back-dbg-upload-until-sco-ready
git_commit_sha 86eece6 96a74a5
start_time 2026-05-15T14:12:08 2026-05-15T14:17:55
See matching parameters
Baseline Candidate
ci_job_id 1685951972 1685951972
ci_pipeline_id 113382925 113382925
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
git_commit_date 1778853782 1778853782

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 9 metrics, 6 unstable metrics.

See unchanged results
scenario Δ mean agg_http_req_duration_min Δ mean agg_http_req_duration_p50 Δ mean agg_http_req_duration_p75 Δ mean agg_http_req_duration_p99 Δ mean throughput
scenario:noprobe unstable
[-77.381µs; +33.962µs] or [-24.671%; +10.828%]
unstable
[-85.386µs; +41.115µs] or [-23.976%; +11.545%]
unstable
[-120.741µs; +53.672µs] or [-31.537%; +14.019%]
unstable
[-698.898µs; +171.352µs] or [-48.096%; +11.792%]
same
scenario:basic same same same unstable
[-132.528µs; +222.599µs] or [-12.238%; +20.556%]
unstable
[-143.112op/s; +265.063op/s] or [-5.868%; +10.868%]
scenario:loop same same same same same
Request duration reports for reports
gantt
    title reports - request duration [CI 0.99] : candidate=None, baseline=None
    dateFormat X
    axisFormat %s
section baseline
noprobe (356.13 µs) : 276, 436
.   : milestone, 356,
basic (299.593 µs) : 291, 309
.   : milestone, 300,
loop (8.989 ms) : 8981, 8996
.   : milestone, 8989,
section candidate
noprobe (333.995 µs) : 306, 362
.   : milestone, 334,
basic (292.026 µs) : 285, 299
.   : milestone, 292,
loop (8.985 ms) : 8980, 8989
.   : milestone, 8985,
Loading
  • baseline results
Scenario Request median duration [CI 0.99]
noprobe 356.13 µs [275.855 µs, 436.406 µs]
basic 299.593 µs [290.634 µs, 308.551 µs]
loop 8.989 ms [8.981 ms, 8.996 ms]
  • candidate results
Scenario Request median duration [CI 0.99]
noprobe 333.995 µs [305.884 µs, 362.106 µs]
basic 292.026 µs [285.309 µs, 298.744 µs]
loop 8.985 ms [8.98 ms, 8.989 ms]

@mcculls mcculls changed the title Defer starting DebuggerAgent until shared comms is ready EXPERIMENT: Defer starting DebuggerAgent until shared comms is ready May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: debugger Dynamic Instrumentation tag: no release notes Changes to exclude from release notes type: feature request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant