File tree Expand file tree Collapse file tree
dd-trace-core/src/main/java/datadog/trace/core Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1171,11 +1171,19 @@ public AgentSpan activeSpan() {
11711171
11721172 @ Override
11731173 public void checkpointActiveForRollback () {
1174+ if (!InstrumenterConfig .get ().isLegacyContextManagerEnabled ()) {
1175+ throw new IllegalStateException (
1176+ "checkpointActiveForRollback must not be called when context swap based logic is enabled" );
1177+ }
11741178 this .scopeManager .checkpointActiveForRollback ();
11751179 }
11761180
11771181 @ Override
11781182 public void rollbackActiveToCheckpoint () {
1183+ if (!InstrumenterConfig .get ().isLegacyContextManagerEnabled ()) {
1184+ throw new IllegalStateException (
1185+ "rollbackActiveToCheckpoint must not be called when context swap based logic is enabled" );
1186+ }
11791187 this .scopeManager .rollbackActiveToCheckpoint ();
11801188 }
11811189
You can’t perform that action at this time.
0 commit comments