use of ratpack.newrelic.NewRelicTransaction in project ratpack by ratpack.
the class NewRelicExecInterceptor method intercept.
@Override
@Trace(dispatcher = true)
public void intercept(Execution execution, ExecType execType, Block executionSegment) throws Exception {
execution.maybeGet(Context.class).ifPresent(context -> {
NewRelicTransaction transaction = execution.maybeGet(NewRelicTransaction.class).orElse(null);
if (transaction == null) {
transaction = new DefaultNewRelicTransaction(context);
execution.add(NewRelicTransaction.class, transaction);
}
transaction.init();
});
executionSegment.execute();
}
Aggregations