Skip to content

Commit 9fb4984

Browse files
authored
Fix logging when uninstrumenting cannot happen (#9851)
if we have a thread in a loop that cannot exit the instrumented method for a while, instrumentation cannot be done. But probe is removed from metadata and cannot be resolved. We were logging this status which is in fact not helpful and generate noise. If probe cannot be resolved we just ignore the instrumentation
1 parent 2413c50 commit 9fb4984

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

dd-java-agent/agent-debugger/src/main/java/com/datadog/debugger/agent/ConfigurationUpdater.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import static com.datadog.debugger.agent.DebuggerProductChangesListener.METRIC_PROBE_PREFIX;
55
import static com.datadog.debugger.agent.DebuggerProductChangesListener.SPAN_DECORATION_PROBE_PREFIX;
66
import static com.datadog.debugger.agent.DebuggerProductChangesListener.SPAN_PROBE_PREFIX;
7-
import static datadog.trace.api.telemetry.LogCollector.SEND_TELEMETRY;
87

98
import com.datadog.debugger.instrumentation.InstrumentationResult;
109
import com.datadog.debugger.probe.ExceptionProbe;
@@ -252,11 +251,7 @@ private void storeDebuggerDefinitions(ConfigurationComparer changes) {
252251
// /!\ This is called potentially by multiple threads from the instrumented code /!\
253252
@Override
254253
public ProbeImplementation resolve(int probeIndex) {
255-
ProbeImplementation probeImplementation = probeMetadata.getProbe(probeIndex);
256-
if (probeImplementation == null) {
257-
ratelimitedLogger.warn(SEND_TELEMETRY, "Cannot resolve probe index={}", probeIndex);
258-
}
259-
return probeImplementation;
254+
return probeMetadata.getProbe(probeIndex);
260255
}
261256

262257
private static void applyRateLimiter(

0 commit comments

Comments
 (0)