rob05c opened a new issue #4903:
URL: https://github.com/apache/trafficcontrol/issues/4903


   Currently, if Traffic Router has a Geo Miss, and then uses the Delivery 
Service's Miss Location, it's logged as `rtype=GEO`. This makes it impossible 
to determine from the logs which IPs were GEO misses.
   
   The code looks like it's here: 
https://github.com/apache/trafficcontrol/blob/b2f32b3fd9d4800aece68e5f4b12911a5f14a4a5/traffic_router/core/src/main/java/com/comcast/cdn/traffic_control/traffic_router/core/router/TrafficRouter.java#L1558
   ```
   if (clientLocation == null) {
        clientLocation = ds.getMissLocation();
   }
   ```
   
   I'd like to propose a new rtype log, `GEO_DS`, when a geo miss occurs. 
   
   I haven't tested, but I believe it may simply be a matter of adding 
`track.setResult(ResultType.GEO_DS);` to the above `if` statement.
   
   This would allow operators to find GEO misses in the logs.
   
   Also note, DS Miss Location may currently be broken, due to a Maxmind change 
to always return the center of the US on a miss. The fix for that shouldn't 
conflict with this feature.
   
   ## I'm submitting a ...
   - [x] new feature / enhancement request
   
   ## Traffic Control components affected ...
   - [x] Traffic Router
   
   ## Current behavior:
   GEO Miss DS Miss Location is  indistinguishable from GEO hit in the logs.
   
   ## Expected / new behavior:
   Traffic Router logs a unique `rtype` for GEO Miss DS Miss Location usage.
   
   ## Minimal reproduction of the problem with instructions:
   Run a TC CDN, ensure requests are made to Traffic Router from an IP not in 
Maxmind or the CZF to a DS with a Miss Location set, observe `rtype=GEO` log 
with no way to distinguish from GEO hit.
   
   ## Anything else:


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to