[ 
https://issues.apache.org/jira/browse/BEAM-6022?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Gajowy closed BEAM-6022.
-------------------------------
       Resolution: Not A Bug
    Fix Version/s: Not applicable

> 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
>            Priority: Major
>             Fix For: Not applicable
>
>
> I noticed that when the below (or any other metric type) is called multiple 
> times:
> {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)

Reply via email to