Skip to content

Commit

Permalink
More logging
Browse files Browse the repository at this point in the history
  • Loading branch information
jbedell-newrelic committed Dec 17, 2024
1 parent 529a093 commit 983fa08
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,13 @@ void setOwningTransactionIsIgnored(boolean newState) {
* @param tracer
*/
public Tracer tracerStarted(Tracer tracer) {
Agent.LOG.log(Level.INFO, "JGB tracerStarted: ", tracer);
StackTraceElement[] elems = Thread.currentThread().getStackTrace());
if (elems != null) {
for (int i = 0; i < elems.length && i < 3; i++) {
Agent.LOG.log(Level.INFO, "JGB -> "elems[i].getClassName() + "." + elems[i].getMethodName());
}
}
Tracer tr = addTracerToStack(tracer);
if (tr != null && getTransaction() != null && tr.isTransactionSegment()) {
getTransaction().getTransactionCounts().addTracer();
Expand All @@ -324,7 +331,7 @@ public Tracer tracerStarted(Tracer tracer) {
*/
public Tracer addTracerToStack(Tracer tracer) {
if (isTracerStartLocked()) {
Agent.LOG.log(Level.FINER, "tracerStarted ignored: tracerStartLock is already active");
Agent.LOG.log(Level.INFO, "JGB tracerStarted ignored: tracerStartLock is already active");
return null;
}

Expand Down Expand Up @@ -496,6 +503,7 @@ public void addTracer(Tracer tracer) {
private void setRootTracer(Tracer tracer) {
rootTracer = tracer;
lastTracer = tracer;
Agent.LOG.log(Level.INFO, "JGB Tracer Debug: called setRootTracer, lastTracer (pointer to top of stack) and rootTracer set to {0}", tracer);
if (Agent.isDebugEnabled() && Agent.LOG.isFinestEnabled()) {
Agent.LOG.log(Level.FINEST, "Tracer Debug: called setRootTracer, lastTracer (pointer to top of stack) and rootTracer set to {0}", tracer);
}
Expand Down

0 comments on commit 983fa08

Please sign in to comment.