Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
clarkxuyang committed Nov 27, 2024
1 parent 33513f5 commit 33f66aa
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,16 +218,14 @@ private static Integer getSiteId(RoutingContext context) {
return null;
}

private void incrementMetricCounter(String apiContact, Integer siteId, String siteName,
String host, int status, HttpMethod method, String path) {
private void incrementMetricCounter(String apiContact, Integer siteId, String siteName, String host, int status, HttpMethod method, String path) {
assert apiContact != null;
String key = apiContact + "|" + siteId + "|" + siteName + "|" + host + "|" + status + "|" + method.name() + "|" + path;
if (!_apiMetricCounters.containsKey(key)) {
Counter counter = Counter
.builder("uid2.http_requests")
.description("counter for how many http requests are processed per each api contact and status code")
.tags("api_contact", apiContact, "site_id", String.valueOf(siteId), "site_name", siteName,
"host", host, "status", String.valueOf(status), "method", method.name(), "path", path)
.tags("api_contact", apiContact, "site_id", String.valueOf(siteId), "site_name", siteName, "host", host, "status", String.valueOf(status), "method", method.name(), "path", path)
.register(Metrics.globalRegistry);
_apiMetricCounters.put(key, counter);
}
Expand Down

0 comments on commit 33f66aa

Please sign in to comment.