Add wallclock TaskBlock profiler support#11544
Conversation
|
🎯 Code Coverage (details) 🔗 Commit SHA: df2f481 | Docs | Datadog PR Page | Give us feedback! |
|
|
||
| JAVA_PROFILER_REF: | ||
| description: "When non-empty, clone DataDog/java-profiler at this Git ref (branch or tag), build ddprof, and use it as ddprof.jar for Gradle jobs instead of the Maven dependency." | ||
| value: "paul.fournillon/wallclock-taskblock" |
There was a problem hiding this comment.
[Sphinx Review — HIGH] JAVA_PROFILER_REF defaults to a personal feature branch ('paul.fournillon/wallclock-taskblock'). The build_java_profiler_ddprof job fires whenever the value is non-empty, so by default the entire pipeline builds and injects ddprof from this personal branch instead of the published artifact. This includes deploy_to_maven_central and deploy_snapshot_with_ddprof_snapshot. If the personal branch is deleted, force-pushed, or renamed, 'git clone --branch' fails and breaks all builds.
Suggestion: Set the default value to an empty string before merge (keep the override mechanism for ad-hoc testing). Apply the same change to env JAVA_PROFILER_REF in .github/workflows/run-system-tests.yaml.
[CONSENSUS · confidence: high · adversary-tested]
There was a problem hiding this comment.
it is definitely not something we want to keep in the end. I've made these temporary changes so the CI tests can run smoothly while working on this PR: it avoids facing build issues that can hide real regression bugs. Before this PR is merged, both .gitlab-ci.yml and .github/workflows will be reset to their original state.
| mkdir -p "${CI_PROJECT_DIR}/custom-ddprof" | ||
| SRCDIR="${CI_PROJECT_DIR}/java-profiler-src" | ||
| rm -rf "$SRCDIR" | ||
| git clone --depth 1 --branch "$JAVA_PROFILER_REF" https://github.com/DataDog/java-profiler.git "$SRCDIR" |
There was a problem hiding this comment.
[Sphinx Review — MEDIUM] External java-profiler clone is pinned only to a mutable branch ref (--branch $JAVA_PROFILER_REF --depth 1) with no commit SHA. The produced ddprof.jar is injected into downstream jobs including deploy_to_maven_central and deploy_snapshot_with_ddprof_snapshot, with no reproducibility or supply-chain integrity guarantee. Any force-push to the branch silently changes the artifact without a CI diff.
Suggestion: Require a commit SHA (or signed tag) rather than a branch for the ref, or restrict the custom-build path to non-publish pipelines. At minimum, exclude build_java_profiler_ddprof from deploy_to_maven_central / deploy_snapshot needs so a custom build can never reach a release.
[concern: security · confidence: medium]
🔴 Java Benchmark SLOs — Performance SLO breach detected
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
95fc3a3 to
df2f481
Compare
What Does This Do
Add support for wall-clock TaskBlock events, including span-context attribution and native event recording for blocking intervals such as
Object.waitand synchronized contention.Motivation
Make blocking time visible as structured
datadog.TaskBlockevents instead of relying only on sampled wall-clock frames. It allows to reduce signal emissions.Additional Notes
Foundation for follow-up LockSupport and Thread.sleep TaskBlock instrumentation.
This PR depends on PR #570 from java-profiler, which adds the new TaskBlock event emission as well as I/O instrumentation.
Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issue/merge. You can also:/merge --commit-message "..."/merge -c/merge -f --reason "reason"; please use this judiciously, as some checks do not run at the PR-levelJira ticket: [PROF-15320](https://datadoghq.atlassian.net/browse/PROF-15320)