Skip to content

Commit

Permalink
Record caller metrics in Atlas
Browse files Browse the repository at this point in the history
  • Loading branch information
Giorgio Trettenero committed Dec 9, 2024
1 parent 52066ec commit c18013c
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,10 @@ public <R> R processRequest(
if (requestTags != null) {
tags.putAll(requestTags);
}

tags.put("request", resourceRequestName);
tags.put("scheme", MetacatContextManager.getContext().getScheme());
tags.put("caller", MetacatContextManager.getContext().getClientAppName());
registry.counter(requestCounterId.withTags(tags)).increment();

try {
Expand Down Expand Up @@ -243,6 +245,7 @@ public <R> R processRequest(
final long start = registry.clock().wallTime();
final Map<String, String> tags = Maps.newHashMap();
tags.put("request", resourceRequestName);
tags.put("caller", MetacatContextManager.getContext().getClientAppName());
registry.counter(requestCounterId.withTags(tags)).increment();
try {
MetacatContextManager.getContext().setRequestName(resourceRequestName);
Expand Down

0 comments on commit c18013c

Please sign in to comment.