Skip to content

Commit

Permalink
Merge pull request #1432 from akto-api-security/feature/cyborg-metrics
Browse files Browse the repository at this point in the history
reverted prod.yml and added null check
  • Loading branch information
avneesh-akto authored Sep 2, 2024
2 parents 76e149e + 6568ca7 commit 70b682b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ jobs:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: akto-api-security
REGISTRY_ALIAS: p7q3h0z2
IMAGE_TAG: traffic_test
IMAGE_TAG2: traffic_test
IMAGE_TAG: kafkalatest
IMAGE_TAG2: latest
run: |
docker buildx create --use
# Build a docker container and push it to DockerHub
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public void createIndicesIfAbsent() {
public void updateCount(TrafficCollectorMetrics trafficCollectorMetrics) {
List<Bson> updates = new ArrayList<>();
Map<String, Integer> requestsCountMapPerMinute = trafficCollectorMetrics.getRequestsCountMapPerMinute();
if (requestsCountMapPerMinute == null || requestsCountMapPerMinute.isEmpty()) return;
for (String key: requestsCountMapPerMinute.keySet()) {
updates.add(Updates.inc(TrafficCollectorMetrics.REQUESTS_COUNT_MAP_PER_MINUTE + "." + key, requestsCountMapPerMinute.getOrDefault(key, 0)));
}
Expand Down

0 comments on commit 70b682b

Please sign in to comment.