public Timer registerTimer(String name) { return registry.timer(name); }
public NetflowMessageAggregationHandler(RemoteAddressCodecAggregator aggregator, MetricRegistry metricRegistry) { this.aggregator = aggregator; aggregationTimer = metricRegistry.timer("aggregationTime"); invalidChunksMeter = metricRegistry.meter("invalidMessages"); }
public ByteBufMessageAggregationHandler(CodecAggregator aggregator, MetricRegistry metricRegistry) { this.aggregator = aggregator; aggregationTimer = metricRegistry.timer("aggregationTime"); invalidChunksMeter = metricRegistry.meter("invalidMessages"); }
protected LookupDataAdapter(String id, String name, LookupDataAdapterConfiguration config, MetricRegistry metricRegistry) { this.id = id; this.name = name; this.config = config; this.requestTimer = metricRegistry.timer(MetricRegistry.name("org.graylog2.lookup.adapters", id, "requests")); this.refreshTimer = metricRegistry.timer(MetricRegistry.name("org.graylog2.lookup.adapters", id, "refresh")); }
public EnvelopeMessageAggregationHandler(CodecAggregator aggregator, MetricRegistry metricRegistry) { this.aggregator = aggregator; aggregationTimer = metricRegistry.timer("aggregationTime"); invalidChunksMeter = metricRegistry.meter("invalidMessages"); }
@Inject public IndexFieldTypePoller(final JestClient jestClient, final Indices indices, final MetricRegistry metricRegistry) { this.jestClient = jestClient; this.indices = indices; this.pollTimer = metricRegistry.timer(name(getClass(), "indexPollTime")); }
public Timer getExecutionTimer(String streamId, String streamRuleId) { Timer timer = this.streamExecutionTimers.get(streamRuleId); if (timer == null) { timer = metricRegistry.timer(MetricRegistry.name(Stream.class, streamId, "StreamRule", streamRuleId, "executionTime")); this.streamExecutionTimers.put(streamRuleId, timer); } return timer; }
@Inject public CEFParserFunction(final MetricRegistry metricRegistry) { this.parseTime = metricRegistry.timer(name(this.getClass(), "parseTime")); }
@Inject public PipelineInterpreter(Journal journal, MetricRegistry metricRegistry, ConfigurationStateUpdater stateUpdater) { this.journal = journal; this.filteredOutMessages = metricRegistry.meter(name(ProcessBufferProcessor.class, "filteredOutMessages")); this.executionTime = metricRegistry.timer(name(PipelineInterpreter.class, "executionTime")); this.stateUpdater = stateUpdater; }
@Inject public DnsLookupDataAdapter(@Assisted("id") String id, @Assisted("name") String name, @Assisted LookupDataAdapterConfiguration config, MetricRegistry metricRegistry) { super(id, name, config, metricRegistry); this.config = (Config) config; this.errorCounter = metricRegistry.counter(MetricRegistry.name(getClass(), id, ERROR_COUNTER)); this.resolveDomainNameTimer = metricRegistry.timer(MetricRegistry.name(getClass(), id, TIMER_RESOLVE_DOMAIN_NAME)); this.reverseLookupTimer = metricRegistry.timer(MetricRegistry.name(getClass(), id, TIMER_REVERSE_LOOKUP)); this.textLookupTimer = metricRegistry.timer(MetricRegistry.name(getClass(), id, TIMER_TEXT_LOOKUP)); }
@Inject public ElasticSearchOutput(MetricRegistry metricRegistry, Messages messages, Journal journal) { this.messages = messages; this.journal = journal; // Only constructing metrics here. write() get's another Core reference. (because this technically is a plugin) this.writes = metricRegistry.meter(WRITES_METRICNAME); this.failures = metricRegistry.meter(FAILURES_METRICNAME); this.processTime = metricRegistry.timer(PROCESS_TIME_METRICNAME); // Should be set in initialize once this becomes a real plugin. isRunning.set(true); }
/** * @param name the name of the metric * @return a timer object with the qualified metric name */ public static Timer timer(String name) { return METRIC_REGISTRY.timer(getMetricName(name)); }
public Timer getTimer(String prefix, String... names) { return getRegistry().timer(MetricRegistry.name(prefix, names)); }
public Timer getTimer(String name) { return getRegistry().timer(name); }
@AssistedInject public ProcessBufferProcessor(MetricRegistry metricRegistry, OrderedMessageProcessors orderedMessageProcessors, OutputBuffer outputBuffer, @Assisted DecodingProcessor decodingProcessor, @DefaultStream Provider<Stream> defaultStreamProvider) { this.orderedMessageProcessors = orderedMessageProcessors; this.outputBuffer = outputBuffer; this.decodingProcessor = decodingProcessor; this.defaultStreamProvider = defaultStreamProvider; incomingMessages = metricRegistry.meter(name(ProcessBufferProcessor.class, "incomingMessages")); outgoingMessages = metricRegistry.meter(name(ProcessBufferProcessor.class, "outgoingMessages")); processTime = metricRegistry.timer(name(ProcessBufferProcessor.class, "processTime")); }
public Timer registerTimer(String name) { return StormMetricRegistry.registry().timer(metricName(name)); }
public TimedMetricsFilter(MetricRegistry metricRegistry, ResourceInfo resourceInfo) { final Timed annotation = resourceInfo.getResourceMethod().getAnnotation(Timed.class); timer = metricRegistry.timer(chooseName(annotation.name(), annotation.absolute(), resourceInfo.getResourceMethod())); }
@Override public Connector build(Server server, MetricRegistry metrics, String name, @Nullable ThreadPool threadPool) { final HttpConfiguration httpConfig = buildHttpConfiguration(); final HttpConnectionFactory httpConnectionFactory = buildHttpConnectionFactory(httpConfig); final Scheduler scheduler = new ScheduledExecutorScheduler(); final ByteBufferPool bufferPool = buildBufferPool(); return buildConnector(server, scheduler, bufferPool, name, threadPool, new Jetty93InstrumentedConnectionFactory(httpConnectionFactory, metrics.timer(httpConnections()))); }
@Override public Connector build(Server server, MetricRegistry metrics, String name, @Nullable ThreadPool threadPool) { // Prepare connection factories for HTTP/2c final HttpConfiguration httpConfig = buildHttpConfiguration(); final HttpConnectionFactory http11 = buildHttpConnectionFactory(httpConfig); final HTTP2ServerConnectionFactory http2c = new HTTP2CServerConnectionFactory(httpConfig); http2c.setMaxConcurrentStreams(maxConcurrentStreams); http2c.setInitialStreamRecvWindow(initialStreamRecvWindow); // The server connector should use HTTP/1.1 by default. It affords to the server to stay compatible // with old clients. New clients which want to use HTTP/2, however, will make an HTTP/1.1 OPTIONS // request with an Upgrade header with "h2c" value. The server supports HTTP/2 clear text connections, // so it will return the predefined HTTP/2 preamble and the client and the server will switch to the // new protocol. return buildConnector(server, new ScheduledExecutorScheduler(), buildBufferPool(), name, threadPool, new Jetty93InstrumentedConnectionFactory(http11, metrics.timer(httpConnections())), http2c); } }