Search in sources :

Example 1 with Tracer

use of com.netflix.zuul.plugins.Tracer in project zuul by Netflix.

the class StartServer method initPlugins.

private void initPlugins() {
    LOG.info("Registering Servo Monitor");
    MonitorRegistry.getInstance().setPublisher(new ServoMonitor());
    LOG.info("Starting Poller");
    MetricPoller.startPoller();
    LOG.info("Registering Servo Tracer");
    TracerFactory.initialize(new Tracer());
    LOG.info("Registering Servo Counter");
    CounterFactory.initialize(new Counter());
    LOG.info("Starting CPU stats");
    final ThreadCpuStats stats = ThreadCpuStats.getInstance();
    stats.start();
}
Also used : Counter(com.netflix.zuul.plugins.Counter) Tracer(com.netflix.zuul.plugins.Tracer) ThreadCpuStats(com.netflix.servo.util.ThreadCpuStats) ServoMonitor(com.netflix.zuul.plugins.ServoMonitor)

Example 2 with Tracer

use of com.netflix.zuul.plugins.Tracer in project zuul by Netflix.

the class StartServer method initZuul.

void initZuul() throws Exception, IllegalAccessException, InstantiationException {
    RequestContext.setContextClass(NFRequestContext.class);
    CounterFactory.initialize(new Counter());
    TracerFactory.initialize(new Tracer());
    LOG.info("Starting Groovy Filter file manager");
    final AbstractConfiguration config = ConfigurationManager.getConfigInstance();
    final String preFiltersPath = config.getString(ZUUL_FILTER_PRE_PATH);
    final String postFiltersPath = config.getString(ZUUL_FILTER_POST_PATH);
    final String routingFiltersPath = config.getString(ZUUL_FILTER_ROUTING_PATH);
    final String customPath = config.getString(ZUUL_FILTER_CUSTOM_PATH);
    FilterLoader.getInstance().setCompiler(new GroovyCompiler());
    FilterFileManager.setFilenameFilter(new GroovyFileFilter());
    if (customPath == null) {
        FilterFileManager.init(5, preFiltersPath, postFiltersPath, routingFiltersPath);
    } else {
        FilterFileManager.init(5, preFiltersPath, postFiltersPath, routingFiltersPath, customPath);
    }
    LOG.info("Groovy Filter file manager started");
}
Also used : AbstractConfiguration(org.apache.commons.configuration.AbstractConfiguration) GroovyCompiler(com.netflix.zuul.groovy.GroovyCompiler) Counter(com.netflix.zuul.plugins.Counter) GroovyFileFilter(com.netflix.zuul.groovy.GroovyFileFilter) Tracer(com.netflix.zuul.plugins.Tracer)

Aggregations

Counter (com.netflix.zuul.plugins.Counter)2 Tracer (com.netflix.zuul.plugins.Tracer)2 ThreadCpuStats (com.netflix.servo.util.ThreadCpuStats)1 GroovyCompiler (com.netflix.zuul.groovy.GroovyCompiler)1 GroovyFileFilter (com.netflix.zuul.groovy.GroovyFileFilter)1 ServoMonitor (com.netflix.zuul.plugins.ServoMonitor)1 AbstractConfiguration (org.apache.commons.configuration.AbstractConfiguration)1