You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Lukasz Gajowy (JIRA)" <ji...@apache.org> on 2018/11/08 16:42:00 UTC
[jira] [Created] (BEAM-6022) Metrics of the same name and type are
created multiple times
Lukasz Gajowy created BEAM-6022:
-----------------------------------
Summary: Metrics of the same name and type are created multiple times
Key: BEAM-6022
URL: https://issues.apache.org/jira/browse/BEAM-6022
Project: Beam
Issue Type: Bug
Components: sdk-java-core
Reporter: Lukasz Gajowy
Assignee: Kenneth Knowles
I noticed that when the below (or any other metric type) is called:
{code:java}
Metrics.counter("namespace", "name");{code}
metrics of the same name and type are created. So when such metrics are queried by name:
{code:java}
MetricQueryResults metrics =
result
.metrics()
.queryMetrics(
MetricsFilter.builder()
.addNameFilter(MetricNameFilter.named(namespace, name))
.build());
Iterable<MetricResult<Long>> counters = metrics.getCounters();{code}
there is ambiguity which MetricResult should be chosen.
Should api users obtain one metric result here?
Should api users merge the counter results if there are multiple returned?
I noticed that all of the results contain the same value (not sure if this is always the case). Should api users read only one of the multiple results to get correct metric.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)