New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collect and show metrics for lookup caches and adapters #3917

Merged
merged 6 commits into from Jun 19, 2017

Conversation

Projects
2 participants
@bernd
Member

bernd commented Jun 15, 2017

Extend lookup caches and data adapters to collect runtime metrics and expose some of them in the UI.

This also fixes an issue with the ContentPackMarker component (6eef181) and the MetricComponent (4640593).

Graylog2/graylog-plugin-map-widget#50 needs to be merged once this is merged.

bernd added some commits Jun 15, 2017

Only re-render MetricContainer if the metric data has changed
This fixes calculation errors with the CounterRate component when the
component gets re-rendered more often than the metrics data changes.

- Add a metricsUpdatedAt property on every metrics update
- Create TimeHelper#nowInSeconds() helper function to avoid code duplication
Avoid warning in ContentPackMarker when contentPack value is null
The contentPack value is not required and can be null when an entity has
not been created from a content pack.

@bernd bernd added this to the 2.3.0 milestone Jun 15, 2017

@bernd bernd requested a review from kroepke Jun 15, 2017

@bernd bernd added this to In Progress in Lookup Tables Jun 15, 2017

@@ -198,4 +215,90 @@ public static Builder builder() {
public abstract Config build();
}
}
private static class InstrumentedCache<K, V> implements Cache<K, V> {

This comment has been minimized.

@kroepke

kroepke Jun 19, 2017

Member

Same as

public class CacheStatsSet implements MetricSet {
?

This comment has been minimized.

@kroepke

kroepke Jun 19, 2017

Member

Or am I missing something here?

This comment has been minimized.

@bernd

bernd Jun 19, 2017

Member

I actually didn't know about the CacheStatsSet...

The problem here is that this would work for the Guava based cache, but not for others. The cache metrics are defined in the LookupCache class so every cache gets the same metrics. We rely on those to show the count and hit rate in the UI.

This comment has been minimized.

@kroepke

kroepke Jun 19, 2017

Member

yeah let's stick to the generic one for now

@@ -0,0 +1,70 @@
import React from 'react';
import Reflux from 'reflux';
//import { Row, Col } from 'react-bootstrap';

This comment has been minimized.

@kroepke

kroepke Jun 19, 2017

Member

left over?

This comment has been minimized.

@bernd

bernd Jun 19, 2017

Member

Yes, will remove.

@kroepke kroepke merged commit ab966d1 into master Jun 19, 2017

3 of 4 checks passed

graylog-project/pr Jenkins build graylog-project-pr-snapshot 241 has failed
Details
ci-web-linter Jenkins build graylog-pr-linter-check 1752 has succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@kroepke kroepke deleted the lut-metrics branch Jun 19, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment