use of com.newrelic.agent.tracers.IgnoreChildSocketCalls in project newrelic-java-agent by newrelic.
the class TransactionProfileSessionImpl method noticeTracerStart.
@Override
public void noticeTracerStart(int signatureId, int tracerFlags, Tracer tracer) {
if (!threadService.isCurrentThreadAnAgentThread()) {
if (tracer == null) {
discoveryProfile.noticeStartTracer(signatureId);
Thread currentThread = Thread.currentThread();
profile.addStackTrace(new BasicThreadInfo(currentThread), currentThread.getStackTrace(), true, ThreadType.BasicThreadType.OTHER);
} else if (tracer.isLeaf() || tracer instanceof IgnoreChildSocketCalls) {
if (stackTraceLimits.get(tracer.getMetricName()).getAndIncrement() < STACK_CAPTURE_LIMIT_PER_METRIC_PER_PERIOD) {
tracer.setAgentAttribute(DefaultTracer.BACKTRACE_PARAMETER_NAME, Thread.currentThread().getStackTrace());
}
}
}
}
Aggregations