Skip to content

Commit

Permalink
PR cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
evanchooly committed Sep 10, 2024
1 parent 2de3ffb commit 13c8c9f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public String createProbeForFrame(String signature) {
StackTraceElement element = findPlaceInStack();
String fingerprint = Fingerprinter.fingerprint(element);
if (fingerprint == null) {
LOG.debug("Unable to fingerprint snapshot");
LOG.debug("Unable to fingerprint stack trace");
return null;
}
CodeOriginProbe probe;
Expand All @@ -82,6 +82,8 @@ public String createProbeForFrame(String signature) {

installProbe(probe);
if (AgentTracer.get().activeSpan() != null) {
// committing here manually so that first run probe encounters decorate the span until the
// instrumentation gets installed
probe.commit(
CapturedContext.EMPTY_CONTEXT, CapturedContext.EMPTY_CONTEXT, Collections.emptyList());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,24 +72,20 @@ public void commit(
AgentSpan span = AgentTracer.activeSpan();

if (span == null) {
LOGGER.debug("Could not find the exit span for probeId {}", id);
LOGGER.debug("Could not find the span for probeId {}", id);
return;
}
String snapshotId = null;
if (isDebuggerEnabled(span)) {
Snapshot snapshot = createSnapshot();
if (fillSnapshot(entryContext, exitContext, caughtExceptions, snapshot)) {
snapshotId = snapshot.getId();
LOGGER.debug(
"committing exception probe id={}, snapshot id={}, exception id={}",
id,
snapshotId,
snapshot.getExceptionId());

LOGGER.debug("committing code origin probe id={}, snapshot id={}", id, snapshotId);
commitSnapshot(snapshot, DebuggerAgent.getSink());
}
}
applySpanOriginTags(span, snapshotId);
DebuggerAgent.getSink().getProbeStatusSink().addEmitting(probeId);
}

private void applySpanOriginTags(AgentSpan span, String snapshotId) {
Expand Down Expand Up @@ -151,7 +147,7 @@ public void buildLocation(InstrumentationResult result) {
type = result.getTypeName();
method = result.getMethodName();
}
// drop line number for exception probe
// drop line number for code origin probe
this.location = new ProbeLocation(type, method, where.getSourceFile(), null);
}

Expand Down

This file was deleted.

0 comments on commit 13c8c9f

Please sign in to comment.