Skip to content
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

EventQueue metrics are not exported #945

Merged
merged 2 commits into from
Jul 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2439,6 +2439,9 @@ private void addComponentMetricInfos() {
// CheckpointProvider metrics
addMetricInfos(_coordinator._cpProvider);

// CoordinatorEventBlockingQueue metrics
addMetricInfos(_coordinator._eventQueue);

// EventProducer metrics
_metricInfos.addAll(EventProducer.getMetricInfos());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
class CoordinatorEventBlockingQueue implements MetricsAware {

private static final Logger LOG = LoggerFactory.getLogger(CoordinatorEventBlockingQueue.class.getName());
private static final Set<BrooklinMetricInfo> METRIC_INFOS = ConcurrentHashMap.newKeySet();
ehoner marked this conversation as resolved.
Show resolved Hide resolved
private final Set<BrooklinMetricInfo> _metricInfos = ConcurrentHashMap.newKeySet();

static final String COUNTER_KEY = "duplicateEvents";
static final String GAUGE_KEY = "queuedEvents";
Expand Down Expand Up @@ -68,7 +68,7 @@ class CoordinatorEventBlockingQueue implements MetricsAware {

BrooklinCounterInfo counterInfo = new BrooklinCounterInfo(MetricRegistry.name(prefix, COUNTER_KEY));
BrooklinGaugeInfo gaugeInfo = new BrooklinGaugeInfo(MetricRegistry.name(prefix, GAUGE_KEY));
METRIC_INFOS.addAll(Arrays.asList(counterInfo, gaugeInfo));
_metricInfos.addAll(Arrays.asList(counterInfo, gaugeInfo));
}


Expand Down Expand Up @@ -161,6 +161,6 @@ public boolean isEmpty() {

@Override
public List<BrooklinMetricInfo> getMetricInfos() {
return new ArrayList<>(METRIC_INFOS);
return new ArrayList<>(_metricInfos);
}
}