diff --git a/newrelic-agent/src/main/java/com/newrelic/agent/instrumentation/InstrumentationImpl.java b/newrelic-agent/src/main/java/com/newrelic/agent/instrumentation/InstrumentationImpl.java index ff1fbf13e3..0c6f8839da 100644 --- a/newrelic-agent/src/main/java/com/newrelic/agent/instrumentation/InstrumentationImpl.java +++ b/newrelic-agent/src/main/java/com/newrelic/agent/instrumentation/InstrumentationImpl.java @@ -90,7 +90,7 @@ public InstrumentationImpl(com.newrelic.api.agent.Logger logger, ClassTransforme static double getAutoAsyncLinkRateLimitInSeconds(ClassTransformerConfig classTransformerConfig) { long rateLimitInMillis = classTransformerConfig.getAutoAsyncLinkRateLimit(); - return (double)rateLimitInMillis / (double) TimeUnit.SECONDS.toMillis(1); + return (double) rateLimitInMillis / (double) TimeUnit.SECONDS.toMillis(1); } /** @@ -360,12 +360,12 @@ public ExitTracer createSqlTracer(Object invocationTarget, int signatureId, Stri } } - @Override - public ExitTracer createScalaTxnTracer() { - return createTracer(null, SCALA_API_TXN_CLASS_SIGNATURE_ID, null, SCALA_API_TRACER_FLAGS); - } + @Override + public ExitTracer createScalaTxnTracer() { + return createTracer(null, SCALA_API_TXN_CLASS_SIGNATURE_ID, null, SCALA_API_TRACER_FLAGS); + } - private boolean overSegmentLimit(TransactionActivity transactionActivity) { + private boolean overSegmentLimit(TransactionActivity transactionActivity) { Transaction transaction; if (transactionActivity == null) { transaction = Transaction.getTransaction(false); @@ -384,7 +384,7 @@ private ExitTracer noticeTracer(int signatureId, int tracerFlags, Tracer result) transactionProfileSession.noticeTracerStart(signatureId, tracerFlags, result); } } catch (Throwable t) { - logger.log(Level.FINEST, t, "exception in noticeTracer: {0}. This may affect thread profile v2.", result); + logger.log(Level.FINEST, "Exception in noticeTracer. This may affect thread profile v2. Tracer: {0}. Error message: {1}", result, t.getMessage()); } return result; } @@ -583,7 +583,7 @@ public void instrument() { NewRelic.recordMetric("Supportability/InstrumentationImpl/instrument", instrumented ? 1f : 0f); } } else { - NewRelic.recordMetric("Supportability/InstrumentationImpl/instrument",0f); + NewRelic.recordMetric("Supportability/InstrumentationImpl/instrument", 0f); } } @@ -610,7 +610,8 @@ private boolean instrument(StackTraceElement stackTraceElement, TraceDetails tra if (shouldRetransform) { logger.log(Level.FINE, "Retransforming {0}.{1} for instrumentation.", stackTraceElement.getClassName(), stackTraceElement.getMethodName()); try { - PeriodicRetransformer.INSTANCE.queueRetransform(ImmutableSet.of(ClassLoader.getSystemClassLoader().loadClass(stackTraceElement.getClassName()))); + PeriodicRetransformer.INSTANCE.queueRetransform( + ImmutableSet.of(ClassLoader.getSystemClassLoader().loadClass(stackTraceElement.getClassName()))); logger.log(Level.FINE, "Retransformed {0}", stackTraceElement.getClassName()); } catch (ClassNotFoundException e) { // the system classloader may not be able to see the class - try to find the class in loaded classes