From 983fa080f1f8c72e040345abe78f4b97eb8ed400 Mon Sep 17 00:00:00 2001 From: John Bedell Date: Tue, 17 Dec 2024 15:21:41 -0500 Subject: [PATCH] More logging --- .../java/com/newrelic/agent/TransactionActivity.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/newrelic-agent/src/main/java/com/newrelic/agent/TransactionActivity.java b/newrelic-agent/src/main/java/com/newrelic/agent/TransactionActivity.java index a1f136cd67..422801c4c9 100644 --- a/newrelic-agent/src/main/java/com/newrelic/agent/TransactionActivity.java +++ b/newrelic-agent/src/main/java/com/newrelic/agent/TransactionActivity.java @@ -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(); @@ -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; } @@ -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); }