Skip to content

Commit

Permalink
Update prometheus test to reflect new collector behavior (#5417)
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-berg authored May 3, 2023

Unverified

This user has not yet uploaded their public signing key.
1 parent 6ba5919 commit f4184df
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -156,11 +156,11 @@ void endToEnd() {

assertThat(resourceMetrics.getScopeMetricsCount()).isEqualTo(1);
ScopeMetrics scopeMetrics = resourceMetrics.getScopeMetrics(0);
assertThat(scopeMetrics.getScope().getName()).isEqualTo("");
assertThat(scopeMetrics.getScope().getName()).isEqualTo("otelcol/prometheusreceiver");

Optional<Metric> optRequestTotal =
scopeMetrics.getMetricsList().stream()
.filter(metric -> metric.getName().equals("requests_total"))
.filter(metric -> metric.getName().equals("requests"))
.findFirst();
assertThat(optRequestTotal).isPresent();
Metric requestTotal = optRequestTotal.get();

0 comments on commit f4184df

Please sign in to comment.