@@ -54,6 +54,7 @@ func processDNSCryptQuery(
5454 if err != nil {
5555 pluginsState .returnCode = PluginsReturnCodeParseError
5656 pluginsState .ApplyLoggingPlugins (& proxy .pluginsGlobals )
57+ updateMonitoringMetrics (proxy , pluginsState )
5758 return nil , err
5859 }
5960
@@ -75,6 +76,7 @@ func processDNSCryptQuery(
7576 if err != nil {
7677 pluginsState .returnCode = PluginsReturnCodeParseError
7778 pluginsState .ApplyLoggingPlugins (& proxy .pluginsGlobals )
79+ updateMonitoringMetrics (proxy , pluginsState )
7880 return nil , err
7981 }
8082 response , err = proxy .exchangeWithTCPServer (serverInfo , sharedKey , encryptedQuery , clientNonce )
@@ -100,6 +102,7 @@ func processDNSCryptQuery(
100102 }
101103 pluginsState .ApplyLoggingPlugins (& proxy .pluginsGlobals )
102104 serverInfo .noticeFailure (proxy )
105+ updateMonitoringMetrics (proxy , pluginsState )
103106 return nil , err
104107 }
105108
@@ -132,6 +135,7 @@ func processDoHQuery(
132135 pluginsState .returnCode = PluginsReturnCodeNetworkError
133136 pluginsState .ApplyLoggingPlugins (& proxy .pluginsGlobals )
134137 serverInfo .noticeFailure (proxy )
138+ updateMonitoringMetrics (proxy , pluginsState )
135139 return nil , err
136140 }
137141
@@ -207,6 +211,7 @@ func processODoHQuery(
207211 pluginsState .returnCode = PluginsReturnCodeNetworkError
208212 pluginsState .ApplyLoggingPlugins (& proxy .pluginsGlobals )
209213 serverInfo .noticeFailure (proxy )
214+ updateMonitoringMetrics (proxy , pluginsState )
210215
211216 return nil , err
212217}
@@ -240,6 +245,7 @@ func handleDNSExchange(
240245 pluginsState .returnCode = PluginsReturnCodeParseError
241246 pluginsState .ApplyLoggingPlugins (& proxy .pluginsGlobals )
242247 serverInfo .noticeFailure (proxy )
248+ updateMonitoringMetrics (proxy , pluginsState )
243249 return nil , err
244250 }
245251
@@ -261,12 +267,14 @@ func processPlugins(
261267 pluginsState .returnCode = PluginsReturnCodeParseError
262268 pluginsState .ApplyLoggingPlugins (& proxy .pluginsGlobals )
263269 serverInfo .noticeFailure (proxy )
270+ updateMonitoringMetrics (proxy , pluginsState )
264271 return response , err
265272 }
266273
267274 if pluginsState .action == PluginsActionDrop {
268275 pluginsState .returnCode = PluginsReturnCodeDrop
269276 pluginsState .ApplyLoggingPlugins (& proxy .pluginsGlobals )
277+ updateMonitoringMetrics (proxy , pluginsState )
270278 return response , nil
271279 }
272280
@@ -275,6 +283,7 @@ func processPlugins(
275283 if err != nil {
276284 pluginsState .returnCode = PluginsReturnCodeParseError
277285 pluginsState .ApplyLoggingPlugins (& proxy .pluginsGlobals )
286+ updateMonitoringMetrics (proxy , pluginsState )
278287 return response , err
279288 }
280289 }
@@ -310,6 +319,7 @@ func sendResponse(
310319 pluginsState .returnCode = PluginsReturnCodeParseError
311320 }
312321 pluginsState .ApplyLoggingPlugins (& proxy .pluginsGlobals )
322+ updateMonitoringMetrics (proxy , pluginsState )
313323 return
314324 }
315325
@@ -320,6 +330,7 @@ func sendResponse(
320330 if err != nil {
321331 pluginsState .returnCode = PluginsReturnCodeParseError
322332 pluginsState .ApplyLoggingPlugins (& proxy .pluginsGlobals )
333+ updateMonitoringMetrics (proxy , pluginsState )
323334 return
324335 }
325336 }
@@ -334,6 +345,7 @@ func sendResponse(
334345 if err != nil {
335346 pluginsState .returnCode = PluginsReturnCodeParseError
336347 pluginsState .ApplyLoggingPlugins (& proxy .pluginsGlobals )
348+ updateMonitoringMetrics (proxy , pluginsState )
337349 return
338350 }
339351 if clientPc != nil {
0 commit comments