Skip to content

Commit

Permalink
Changed line to prevent IndexOutOfBoundsException
Browse files Browse the repository at this point in the history
  • Loading branch information
Danielzolty committed Nov 27, 2023
1 parent 270890c commit 01a60ac
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
import io.opentelemetry.semconv.resource.attributes.ResourceAttributes;
import lombok.extern.log4j.Log4j2;

import java.lang.management.ManagementFactory;
import java.lang.management.MemoryMXBean;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ThreadLocalRandom;
Expand Down Expand Up @@ -119,7 +121,7 @@ private void createCounters(Meter meter) {
if(meter!= null) {
log.info("Registering counter metrics...");
counters = new LongCounter[param.getDatapointCount()];
for(int id=0 ; id < param.getMetricCount(); id++) {
for(int id=0 ; id < param.getDatapointCount(); id++) {
counters[id] = meter.counterBuilder(API_COUNTER_METRIC + id)
.setDescription("API request load sent in bytes")
.setUnit("one")
Expand Down

0 comments on commit 01a60ac

Please sign in to comment.