File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
metacat-main/src/main/java/com/netflix/metacat/main/api Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,6 @@ public <R> R processRequest(
154154 if (requestTags != null ) {
155155 tags .putAll (requestTags );
156156 }
157-
158157 tags .put ("request" , resourceRequestName );
159158 tags .put ("scheme" , MetacatContextManager .getContext ().getScheme ());
160159 String clientAppName = MetacatContextManager .getContext ().getClientAppName ();
@@ -249,7 +248,11 @@ public <R> R processRequest(
249248 final long start = registry .clock ().wallTime ();
250249 final Map <String , String > tags = Maps .newHashMap ();
251250 tags .put ("request" , resourceRequestName );
252- tags .put ("caller" , MetacatContextManager .getContext ().getClientAppName ());
251+ String clientAppName = MetacatContextManager .getContext ().getClientAppName ();
252+ if (clientAppName == null ) {
253+ clientAppName = "UNKNOWN" ;
254+ }
255+ tags .put ("caller" , clientAppName );
253256 registry .counter (requestCounterId .withTags (tags )).increment ();
254257 try {
255258 MetacatContextManager .getContext ().setRequestName (resourceRequestName );
You can’t perform that action at this time.
0 commit comments