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(
154
154
if (requestTags != null ) {
155
155
tags .putAll (requestTags );
156
156
}
157
-
158
157
tags .put ("request" , resourceRequestName );
159
158
tags .put ("scheme" , MetacatContextManager .getContext ().getScheme ());
160
159
String clientAppName = MetacatContextManager .getContext ().getClientAppName ();
@@ -249,7 +248,11 @@ public <R> R processRequest(
249
248
final long start = registry .clock ().wallTime ();
250
249
final Map <String , String > tags = Maps .newHashMap ();
251
250
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 );
253
256
registry .counter (requestCounterId .withTags (tags )).increment ();
254
257
try {
255
258
MetacatContextManager .getContext ().setRequestName (resourceRequestName );
You can’t perform that action at this time.
0 commit comments