-
Notifications
You must be signed in to change notification settings - Fork 357
Disable Exception Replay for JDK < 11 #12411
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,7 @@ | |
|
|
||
| import static datadog.trace.api.Config.isExplicitlyDisabled; | ||
|
|
||
| import datadog.environment.JavaVirtualMachine; | ||
| import datadog.trace.api.Config; | ||
| import datadog.trace.api.config.DebuggerConfig; | ||
| import datadog.trace.api.config.TraceInstrumentationConfig; | ||
|
|
@@ -29,12 +30,17 @@ public void updateConfig(DebuggerConfigUpdate update) { | |
| update.getDynamicInstrumentationEnabled(), | ||
| DebuggerAgent::startDynamicInstrumentation, | ||
| DebuggerAgent::stopDynamicInstrumentation); | ||
| startOrStopFeature( | ||
| config, | ||
| DebuggerConfig.EXCEPTION_REPLAY_ENABLED, | ||
| update.getExceptionReplayEnabled(), | ||
| DebuggerAgent::startExceptionReplay, | ||
| DebuggerAgent::stopExceptionReplay); | ||
| if (JavaVirtualMachine.isJavaVersionAtLeast(11)) { | ||
|
jpbempel marked this conversation as resolved.
jpbempel marked this conversation as resolved.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Exception Replay stays active on JDK 8 and can expose the JVM to the crash that this change tries to prevent. Assertion details
Was this helpful? React 👍 or 👎 |
||
| // Cannot remotely enable Exception Replay for JDK < 11 (JVM 8 bug) | ||
| startOrStopFeature( | ||
| config, | ||
| DebuggerConfig.EXCEPTION_REPLAY_ENABLED, | ||
| update.getExceptionReplayEnabled(), | ||
| DebuggerAgent::startExceptionReplay, | ||
| DebuggerAgent::stopExceptionReplay); | ||
| } else { | ||
| LOGGER.debug("Cannot start Exception Replay on JDK version < 11"); | ||
| } | ||
| startOrStopFeature( | ||
| config, | ||
| TraceInstrumentationConfig.CODE_ORIGIN_FOR_SPANS_ENABLED, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.