/** * Activates the control channel, which will from now on behave in accordance with the routes you * set up in your bootstrap script(s). * * <p>See {@link ControlChannel#waitShutdown} and {@link ControlChannel#sendShutdownSignal()} for * instructions on shutting down an activated channel. */ public void activate() { try { log.info("Activating control channel."); final CamelContext context = getContext(); log.info("Configuring trace interceptor for {}.", context.getName()); TraceBuilder builder = new TraceBuilder(getConfig(), tracer); context.addInterceptStrategy(builder.build()); log.debug("Starting underlying camel context."); context.start(); } catch (Exception e) { throw new LifecycleException(e.getLocalizedMessage(), e); } }
public void traceBegin(String name, long minimumTraceTime, int flags) { TraceBuilder traceBuilder = tracer.getHandler(); traceBuilder.traceBegin(symbolRegistry.symbolId(name), System.currentTimeMillis(), flags); traceBuilder.setMinimumTraceTime(minimumTraceTime); }