Skip to content

Commit

Permalink
Fix error after refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
faderskd committed Aug 29, 2023
1 parent 9b6389a commit 5f24e2d
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package pl.allegro.tech.hermes.management.infrastructure.prometheus;

import java.util.stream.Collectors;
import java.util.stream.Stream;
import pl.allegro.tech.hermes.api.SubscriptionName;

Check warning on line 5 in hermes-management/src/main/java/pl/allegro/tech/hermes/management/infrastructure/prometheus/PrometheusMetricsProvider.java

View workflow job for this annotation

GitHub Actions / checkstyle-hermes-management

[checkstyle-hermes-management] hermes-management/src/main/java/pl/allegro/tech/hermes/management/infrastructure/prometheus/PrometheusMetricsProvider.java#L5 <com.puppycrawl.tools.checkstyle.checks.imports.CustomImportOrderCheck>

Import statement for 'pl.allegro.tech.hermes.api.SubscriptionName' is in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this line.
Raw output
/home/runner/work/hermes/hermes/hermes-management/src/main/java/pl/allegro/tech/hermes/management/infrastructure/prometheus/PrometheusMetricsProvider.java:5:1: warning: Import statement for 'pl.allegro.tech.hermes.api.SubscriptionName' is in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this line. (com.puppycrawl.tools.checkstyle.checks.imports.CustomImportOrderCheck)
import pl.allegro.tech.hermes.api.TopicName;

Check warning on line 6 in hermes-management/src/main/java/pl/allegro/tech/hermes/management/infrastructure/prometheus/PrometheusMetricsProvider.java

View workflow job for this annotation

GitHub Actions / checkstyle-hermes-management

[checkstyle-hermes-management] hermes-management/src/main/java/pl/allegro/tech/hermes/management/infrastructure/prometheus/PrometheusMetricsProvider.java#L6 <com.puppycrawl.tools.checkstyle.checks.imports.CustomImportOrderCheck>

Import statement for 'pl.allegro.tech.hermes.api.TopicName' is in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this line.
Raw output
/home/runner/work/hermes/hermes/hermes-management/src/main/java/pl/allegro/tech/hermes/management/infrastructure/prometheus/PrometheusMetricsProvider.java:6:1: warning: Import statement for 'pl.allegro.tech.hermes.api.TopicName' is in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this line. (com.puppycrawl.tools.checkstyle.checks.imports.CustomImportOrderCheck)
import pl.allegro.tech.hermes.management.infrastructure.metrics.MonitoringMetricsContainer;

Check warning on line 7 in hermes-management/src/main/java/pl/allegro/tech/hermes/management/infrastructure/prometheus/PrometheusMetricsProvider.java

View workflow job for this annotation

GitHub Actions / checkstyle-hermes-management

[checkstyle-hermes-management] hermes-management/src/main/java/pl/allegro/tech/hermes/management/infrastructure/prometheus/PrometheusMetricsProvider.java#L7 <com.puppycrawl.tools.checkstyle.checks.imports.CustomImportOrderCheck>

Import statement for 'pl.allegro.tech.hermes.management.infrastructure.metrics.MonitoringMetricsContainer' is in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this line.
Raw output
/home/runner/work/hermes/hermes/hermes-management/src/main/java/pl/allegro/tech/hermes/management/infrastructure/prometheus/PrometheusMetricsProvider.java:7:1: warning: Import statement for 'pl.allegro.tech.hermes.management.infrastructure.metrics.MonitoringMetricsContainer' is in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this line. (com.puppycrawl.tools.checkstyle.checks.imports.CustomImportOrderCheck)
Expand Down Expand Up @@ -35,9 +37,11 @@ public PrometheusMetricsProvider(PrometheusClient prometheusClient, String consu
this.prometheusClient = prometheusClient;
this.consumersMetricsPrefix = consumersMetricsPrefix.isEmpty() ? "" : consumersMetricsPrefix + "_";
this.frontendMetricsPrefix = frontendMetricsPrefix.isEmpty() ? "" : frontendMetricsPrefix + "_";
this.subscriptionMetricsToQuery = String.join("|", List.of(SUBSCRIPTION_DELIVERED, SUBSCRIPTION_TIMEOUTS,
this.subscriptionMetricsToQuery = Stream.of(SUBSCRIPTION_DELIVERED, SUBSCRIPTION_TIMEOUTS,
SUBSCRIPTION_THROUGHPUT, SUBSCRIPTION_OTHER_ERRORS, SUBSCRIPTION_BATCHES,
SUBSCRIPTION_STATUS_CODES));
SUBSCRIPTION_STATUS_CODES)
.map(this::consumerMetricName)
.collect(Collectors.joining("|"));
this.topicMetricsToQuery = String.join("|", List.of(
frontendMetricName(TOPIC_RATE),
consumerMetricName(TOPIC_DELIVERY_RATE),
Expand Down

0 comments on commit 5f24e2d

Please sign in to comment.