Skip to content

Expose OTel thread/process context without requiring profiling to be enabled - #12546

Open
jandro996 wants to merge 18 commits into
masterfrom
otel-context-without-profiling
Open

jandro996 wants to merge 18 commits into
masterfrom
otel-context-without-profiling

Conversation

@jandro996

@jandro996 jandro996 commented Sep 17, 2026 •

Copy link
Copy Markdown
Member

What Does This Do

  • Adds Config.isDatadogProfilerSafeAndConfigured(), exposing the existing raw Datadog-profiler
    env-safety/explicit-flag predicate (native-image/J9/JDK8-aarch64 exclusions included) without the
    isProfilingEnabled() AND-prefix that isDatadogProfilerEnabled() applies.
  • Adds Config.isOtelContextExposureEnabled(): enabled whenever the profiler is safe and configured
    and either profiling is enabled or AppSec's activation level is ProductActivation.FULLY_ENABLED.
    There is no dedicated override flag - the same way isProfilingEnabled() has no per-feature
    override beyond DD_PROFILING_ENABLED, disabling profiling and AppSec (DD_PROFILING_ENABLED,
    DD_APPSEC_ENABLED) is already the kill switch for this feature too.
  • Changes Agent.createProfilingContextIntegration()'s ddprof branch to gate on
    isDatadogProfilerEnabled() || isOtelContextExposureEnabled() (additive - never disables ddprof
    for a user where real profiling already enabled it) instead of solely on
    isDatadogProfilerEnabled().
  • Adds DeferredProfilingContextIntegration, which wraps the real DatadogProfilingIntegration
    behind a no-op delegate until AgentTaskScheduler runs the construction off the premain thread,
    then swaps it in. Constructing the real integration touches java.nio.file (via
    TempLocationManager) and loads the ddprof native library, which must not happen on the
    primordial premain thread. Profiling-enabled users are unaffected - they keep the exact
    synchronous construction they had before, since profiling accuracy needs every scope from the
    first one. The new AppSec-only trigger is the first path that could have reached this
    construction from premain, so it goes through the deferred wrapper instead.
  • Reflectively calls ProcessContext.register(ConfigProvider) from the same branch, so the
    process-wide OTel context descriptor is published even when ProfilingAgent.run() never executes
    (the AppSec-only, profiling-disabled case). initializeAllContext() is idempotent by design
    (verified from the ddprof sources), so no double-invocation guard was added.

Why AppSec-only users need this

Today, exposing the OTel thread-local span context and the process-wide descriptor to external
eBPF/CWS consumers is entirely collapsed into Config.isProfilingEnabled(). AppSec-only
deployments (profiling disabled, AppSec FULLY_ENABLED) never get either signal, even though
neither actually depends on the profiling recording engine running - only on the ddprof native
library being loaded. This change decouples both gates from profiling so an AppSec-only JVM can
be read by the eBPF/CWS consumer, matching cross-tracer precedent (dd-trace-py's decoupled flag,
PHP's plain DD_APPSEC_ENABLED=true trigger).

Additional Notes

  • _dd.profiling.ctx will now appear on AppSec-only users' spans with no real profile behind it -
    this is an accepted, pre-existing side effect of instantiating DatadogProfilingIntegration, not
    a new bug introduced by this change.
  • No new public configuration flag is introduced by this PR: an earlier iteration added
    DD_TRACE_OTEL_CONTEXT_EXPOSURE_ENABLED as an explicit override, but it was dropped in favor of
    pure derivation from the existing DD_PROFILING_ENABLED/DD_APPSEC_ENABLED flags, following the
    same "no dedicated sub-flag" precedent isProfilingEnabled() itself sets.
  • The THREAD_CONTEXT_SHARING system-tests scenario (eBPF/CWS end-to-end validation) requires a
    Linux host with system-probe support and cannot be run from this darwin dev machine - it's a
    manual/CI follow-up, not covered by this PR's test suite.
  • DeferredProfilingContextIntegration's 1-second delay is a mitigation for the premain/java.nio.file
    race, not a guarantee - there's no JVM hook for "the application has entered main". It's still a
    net improvement: the pre-existing synchronous path for profiling-enabled users has zero mitigation
    for that same race today. A class-load-triggered signal was prototyped as a stronger alternative and
    rejected - it fires before main() runs, which is earlier than the delay, so it removes the head
    start the delay gives fast-starting apps instead of closing the race.

Contributor Checklist

Jira ticket: APPSEC-70088

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.

- Add Config.isDatadogProfilerSafeAndConfigured() as the raw ddprof
  env-safety/explicit-flag predicate, without the isProfilingEnabled()
  AND-prefix
- Add Config.isOtelContextExposureEnabled(), defaulting to enabled when
  the profiler is safe/configured and either profiling is enabled or
  AppSec is fully enabled, with an explicit
  DD_TRACE_OTEL_CONTEXT_EXPOSURE_ENABLED override
- Gate Agent.createProfilingContextIntegration()'s ddprof branch on the
  new flag (additive, ORed with the existing profiling gate) and
  reflectively register the process context even when profiling never
  starts
- Add TRACE_OTEL_CONTEXT_EXPOSURE_ENABLED to OtlpConfig and
  supported-configurations.json
@jandro996 jandro996 added type: feature Enhancements and improvements comp: config Configuration comp: profiling Profiling labels Sep 17, 2026
@jandro996

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-24T09:32:44.727761Z c7c52f9 Manual request
🔒 Security Review ✅ Completed 2026-09-24T09:34:16.449092Z c7c52f9 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 2940f6aa6e

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2940f6aa6e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/Agent.java Outdated
Comment thread dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/Agent.java Outdated
@datadog-official

This comment has been minimized.

@dd-octo-sts

dd-octo-sts Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 14.07 s 13.97 s [-0.2%; +1.5%] (no difference)
startup:insecure-bank:tracing:Agent 12.95 s 13.00 s [-1.0%; +0.3%] (no difference)
startup:petclinic:appsec:Agent 17.15 s 16.78 s [+1.2%; +3.3%] (significantly worse)
startup:petclinic:iast:Agent 16.88 s 16.97 s [-1.3%; +0.3%] (no difference)
startup:petclinic:profiling:Agent 16.74 s 16.93 s [-2.5%; +0.2%] (no difference)
startup:petclinic:sca:Agent 17.05 s 16.73 s [+0.9%; +2.8%] (maybe worse)
startup:petclinic:tracing:Agent 16.12 s 16.13 s [-1.1%; +0.9%] (no difference)

Commit: c7c52f92 · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

…-only trigger

Constructing DatadogProfilingIntegration touches java.nio.file (via
TempLocationManager) and loads the ddprof native library, which must not
happen on the primordial premain thread. Users with the Datadog profiler
enabled were unaffected (they already ran this synchronously), but the
new AppSec-only trigger reached this construction from premain for the
first time.

DeferredProfilingContextIntegration wraps the real integration behind a
NoOp delegate until AgentTaskScheduler runs the deferred construction off
the premain thread, then swaps it in. The profiler-enabled path keeps the
exact synchronous behavior it had before, since profiling accuracy needs
every scope from the first one.

Addresses a P1 finding from the Codex review on this PR.
…profiling/AppSec

isOtelContextExposureEnabled() no longer has its own explicit override. It mirrors
isProfilingEnabled(), which has no dedicated sub-flag either: the kill switch is
disabling DD_PROFILING_ENABLED and DD_APPSEC_ENABLED, the same flags that already
drive the derivation. This removes the DD_TRACE_OTEL_CONTEXT_EXPOSURE_ENABLED public
config entirely, along with its metadata/supported-configurations.json entry - so
there is no new config requiring Feature Parity Dashboard registration, which was
causing the config-inversion-local-validation.py CI job to fail.
- Add OtelContextExposureSmokeTest verifying OTel process context registration follows AppSec activation, not profiling
- Extend DeferredProfilingContextIntegrationTest to cover all delegate pass-through methods (onAttach/onDetach/encodeOperationName/encodeResourceName/onRootSpanFinished), not just newScopeState/name
decisions.md is a session-local planning artifact and should not ship as part of
the PR diff; it is now added to the global gitignore alongside progress.md/task_plan.md.
@jandro996 jandro996 added the tag: override groovy enforcement Override the "Enforce Groovy Migration" check label Sep 18, 2026
@jandro996

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 060ff1f2d6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 060ff1f2d6

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@jandro996

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 060ff1f2d6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 060ff1f2d6

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@jandro996

jandro996 commented Sep 18, 2026 •

Copy link
Copy Markdown
Member Author

Looked into the three "maybe worse" startup scenarios:

  • petclinic:appsec: expected. isOtelContextExposureEnabled() (Config.java) now returns true when AppSec is FULLY_ENABLED even with profiling off, so this scenario reaches the ddprof branch in Agent.createProfilingContextIntegration() for the first time. The extra synchronous work before the deferred construction hands off to AgentTaskScheduler (classloader lookups, task submission) accounts for the small cost.
  • petclinic:sca: same root cause, not something new to this scenario specifically. Per the benchmark config (apm-sdks-benchmarks/.gitlab/ci-java-startup-parallel.yml), the SCA instance launches with -Ddd.appsec.enabled=true -Ddd.appsec.sca.enabled=true, i.e. AppSec is fully enabled for this scenario too, so it hits the same new branch as petclinic:appsec.
  • insecure-bank:iast: looks like a false positive. That instance only sets -Ddd.iast.enabled=true, with no -Ddd.appsec.enabled, so getAppSecActivation() stays ENABLED_INACTIVE and isOtelContextExposureEnabled() is false: this PR's diff is an unreached branch there, behavior identical to master. This is corroborated by petclinic:iast, which has the exact same gate condition and is reported as "no difference" in the same run.

Given appsec/sca are the intended new trigger for OTel context exposure, this small startup cost is accepted as part of APPSEC-70088's scope. Happy to look further if this reproduces as a bigger regression on a re-run.

Note: If reviewers agree with this change before merging, I'll open a PR against DataDog/apm-sdks-benchmarks to bump the SLO threshold accordingly, then re-run the benchmarks for this PR.

@jandro996
jandro996 marked this pull request as ready for review September 21, 2026 08:23
@jandro996
jandro996 requested review from a team as code owners September 21, 2026 08:23
@jandro996
jandro996 requested review from dromanol and manuel-alvarez-alvarez and removed request for a team September 21, 2026 08:23
@jandro996

Copy link
Copy Markdown
Member Author

@codex review

@jandro996
jandro996 requested a review from dougqh September 23, 2026 09:19

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 92339b3acd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 92339b3acd

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

…ten smoke test assertion

DeferredProfilingContextIntegration forwarded most methods to its delegate
but fell back to the interface defaults for isThreadContextBindingRequired()
and setContext(Context), so virtual-thread context rebinding silently never
happened on the AppSec-only path even after the deferred ddprof integration
was swapped in.

OtelContextExposureSmokeTest only asserted the 'Registering process
context...' log line, which is emitted unconditionally before the actual
registration outcome is known. Also assert the failure log line is absent.
@jandro996

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 33352ec55c

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 33352ec55c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/Agent.java Outdated
…ory-level registration failure in smoke test
@jandro996

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: a75de833ee

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: a75de833ee

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@jandro996
jandro996 requested a review from claponcet September 23, 2026 10:30
@mcculls

mcculls commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

General feedback: this PR adds very verbose comments to files where the code style has been to have succinct and focused comments. Could you do a round of cleanup before merging to try and reduce them to one or two lines.

i.e. limit comments to key details which are not obvious from the code

Comment thread internal-api/src/main/java/datadog/trace/api/Config.java Outdated
Comment thread internal-api/src/main/java/datadog/trace/api/Config.java Outdated
Reduce multi-paragraph Javadocs to 1-2 lines across the OTel context
exposure changes, keeping only non-obvious rationale.
@jandro996

Copy link
Copy Markdown
Member Author

General feedback: this PR adds very verbose comments to files where the code style has been to have succinct and focused comments. Could you do a round of cleanup before merging to try and reduce them to one or two lines.

i.e. limit comments to key details which are not obvious from the code

I agree, I’ve already changed it. A few months ago I started adding more comments (also verbose ones) based on a recommendation to provide more context to the AI, but I haven’t noticed much of a difference.

Comment thread dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/Agent.java Outdated
Rename isOtelContextExposureEnabled() to isOtelThreadContextEnabled() and
the internal isDatadogProfilerEnabled field to isDatadogProfilerSafeAndConfigured
so each name matches what it actually represents. Also replace remaining
em dashes introduced by the previous comment-trimming commit.

@mcculls mcculls left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few readability and maintainability comments - approving for the SDK side of things

Also noting for myself that a more modular startup process would have made this integration easier

…reviewer feedback

Replace the single createDdprofContextIntegration/ddprofContextIntegrationFactory
pair, which reused one boolean flag for two unrelated purposes (defer-vs-sync
construction, and process-context registration), with four dedicated methods:
loadDdprofContextIntegration, deferDdprofContextIntegration, and the shared
private helpers newDdprofContextIntegration and registerProcessContext.

Also apply double-checked locking to DeferredProfilingContextIntegration#whenAvailable,
now safe since delegate is volatile, and clarify the initialize() Javadoc contract.
@jandro996

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: c7c52f9219

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: c7c52f9219

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

static ProfilingContextIntegration createProfilingContextIntegration() {
Config config = Config.get();
// AWS Lambda has no ddprof native library support, same as startProfilingAgent().
if (!OperatingSystem.isWindows() && !isAwsLambdaRuntime()) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The !OperatingSystem.isWindows() half of this guard looks redundant: Config already zeroes both isDatadogProfilerEnabled() and isOtelThreadContextEnabled() on Windows via isDatadogProfilerSafeAndConfigured, which isDatadogProfilerEnablementOverridden() forces false with its own OperatingSystem.isWindows() check (Config.java around line 4238). Not wrong today, but it's a second, independently-maintained Windows exclusion — if the Config-side check is ever relaxed without noticing this duplicate, someone reasoning from Config alone would conclude the feature now works on Windows while this stale check silently keeps it off.

The !isAwsLambdaRuntime() half is not redundant — Config has no Lambda exclusion — so only the Windows half would be safe to drop.

🤖 Generated with Claude Code

* #INITIALIZATION_DELAY_MILLIS}.
*/
void scheduleInitialization() {
AgentTaskScheduler.get().schedule(this::initialize, INITIALIZATION_DELAY_MILLIS, MILLISECONDS);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Comment from Claude] INITIALIZATION_DELAY_MILLIS (1s) is a fixed-time heuristic for "main() has had a chance to install its own java.nio.file.spi.DefaultFileSystemProvider," not an actual lifecycle signal — it narrows the premain/java.nio.file race rather than closing it.

An application with slow classloading/DI startup (a large Spring context, or a container with throttled CPU) that installs a custom FileSystemProvider more than 1s into main() would still race with the deferred ddprof native-library load exactly as before this PR, just less often. The PR description already acknowledges this as accepted risk ("not a guarantee"), so this is mostly a request for a one-line confirmation that a fixed delay is intended to be acceptable long-term, rather than a hidden gap.

🤖 Generated with Claude Code

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: config Configuration comp: profiling Profiling tag: override groovy enforcement Override the "Enforce Groovy Migration" check type: feature Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants