Skip to content

Commit

Permalink
re-order matching check and fix a merge issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jwatson committed Jul 30, 2020
1 parent 510420e commit cbbe742
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
import io.opentelemetry.sdk.internal.MillisClock;
import io.opentelemetry.sdk.metrics.data.MetricData;
import io.opentelemetry.sdk.metrics.export.MetricProducer;
import io.opentelemetry.sdk.metrics.view.AggregationConfiguration;
import io.opentelemetry.sdk.metrics.view.InstrumentSelector;
import io.opentelemetry.sdk.resources.Resource;
import java.util.ArrayList;
import java.util.Collection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ private AggregationConfiguration findBestMatch(InstrumentDescriptor descriptor)
for (Map.Entry<InstrumentSelector, AggregationConfiguration> entry : configuration.entrySet()) {
InstrumentSelector registeredSelector = entry.getKey();

if (matchesOnName(descriptor, registeredSelector)
&& matchesOnType(descriptor, registeredSelector)) {
if (matchesOnType(descriptor, registeredSelector)
&& matchesOnName(descriptor, registeredSelector)) {
return entry.getValue();
}
}
Expand Down

0 comments on commit cbbe742

Please sign in to comment.