From cb98913b9602c4141d7b22c1ec64c6dfb722b6b1 Mon Sep 17 00:00:00 2001 From: Giorgio Trettenero Date: Tue, 10 Dec 2024 16:24:41 -0800 Subject: [PATCH] assign to variable --- .../java/com/netflix/metacat/main/api/RequestWrapper.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/metacat-main/src/main/java/com/netflix/metacat/main/api/RequestWrapper.java b/metacat-main/src/main/java/com/netflix/metacat/main/api/RequestWrapper.java index 304c9873..ca981b75 100644 --- a/metacat-main/src/main/java/com/netflix/metacat/main/api/RequestWrapper.java +++ b/metacat-main/src/main/java/com/netflix/metacat/main/api/RequestWrapper.java @@ -161,7 +161,11 @@ public R processRequest( log.info(MetacatContextManager.getContext().toString()); log.info(MetacatContextManager.getContext().getClientAppName()); log.info("------------------------------------------------"); - tags.put("caller", MetacatContextManager.getContext().getClientAppName()); + String clientAppName = MetacatContextManager.getContext().getClientAppName(); + if (clientAppName == null) { + clientAppName = "I SET IT NULL"; + } + tags.put("caller", clientAppName); registry.counter(requestCounterId.withTags(tags)).increment(); try {