Add JFR scrubbing before profile upload by jbachorik · Pull Request #10577 · DataDog/dd-trace-java

@jbachorik jbachorik changed the title Add JFR scrubbing before profile upload [WIP] Add JFR scrubbing before profile upload

Feb 12, 2026
The JVM only eagerly resolves superclass and interfaces during
defineClass. Field types, method parameter/return types, and declared
exceptions are resolved lazily. Marking them as REQUIRES created false
dependency cycles that broke topological sort ordering when injecting
large helper batches (2000+ classes).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Scrub sensitive fields (system properties, JVM arguments, environment
variables, process command lines) from JFR recordings before upload.

- Add profiling-scrubber module wrapping jafar-tools Scrubber
- Wire ScrubRecordingDataListener decorator into ProfilingAgent
- Add RecordingData.getPath() to avoid stream materialization for
  file-backed recordings (ddprof)
- Add config: dd.profiling.scrub.enabled, dd.profiling.scrub.fail-open,
  dd.profiling.scrub.event-type-excludes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@jbachorik @claude

- Guard ThrowableInstanceAdvice during native-image build to prevent
  JFR event class initialization errors
- Enable profiling scrubber in native image build args
- Add smoke test verifying JFR files with system property events are
  produced (scrubbing assertion deferred until jafar handles
  SubstrateVM JFR chunk format)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@jbachorik jbachorik changed the title [WIP] Add JFR scrubbing before profile upload Add JFR scrubbing before profile upload

Feb 23, 2026

@jbachorik jbachorik changed the title Add JFR scrubbing before profile upload [WIP] Add JFR scrubbing before profile upload

Feb 23, 2026

@jbachorik @claude

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@jbachorik jbachorik changed the title [WIP] Add JFR scrubbing before profile upload Add JFR scrubbing before profile upload

Feb 23, 2026

@jbachorik

@jbachorik

@jbachorik