Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MINOR: Rename metric in MetricsResourceMethodApplicationListener #346

Merged
merged 1 commit into from
Aug 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ public MethodMetrics(ResourceMethod method, PerformanceMetric annotation, Metric
"The average number of HTTP requests per second.", allTags);
this.requestSizeSensor.add(metricName, new Rate(new WindowedCount()));
metricName = new MetricName(
getName(method, annotation, "request-cumulative-count"), metricGrpName,
getName(method, annotation, "request-total"), metricGrpName,
"The request count using a cumulative counter", allTags);
this.requestSizeSensor.add(metricName, new CumulativeCount());
metricName = new MetricName(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,12 @@ public void testSuccessMetrics() {
for (KafkaMetric metric : TestMetricsReporter.getMetricTimeseries()) {
switch (metric.metricName().name()) {
case "request-count": // global metrics
case "request-cumulative-count": // global metrics
case "request-total": // global metrics
assertMetric(metric, totalRequests);
totalRequestsCheckpoint++;
break;
case "hello.request-count": // method metrics
case "hello.request-cumulative-count": // method metrics
case "hello.request-total": // method metrics
if (metric.metricName().tags().containsValue("value1")) {
assertMetric(metric, (totalRequests + 1) / 3);
helloTag1RequestsCheckpoint++;
Expand Down