moonchen commented on code in PR #13286:
URL: https://github.com/apache/trafficserver/pull/13286#discussion_r3444046307


##########
plugins/header_rewrite/statement.cc:
##########
@@ -21,6 +21,24 @@
 //
 #include "statement.h"
 
+int hrw_stat_operators  = TS_ERROR;
+int hrw_stat_conditions = TS_ERROR;
+
+void
+init_hrw_work_stats()
+{
+  // Plugin init is single-threaded, so the create-once guard is safe. 
header_rewrite.so can
+  // be loaded both globally and as a remap plugin; both must share one 
process-wide stat.
+  if (TS_ERROR == hrw_stat_operators) {
+    hrw_stat_operators = 
TSStatCreate("proxy.process.plugin.header_rewrite.operators", 
TS_RECORDDATATYPE_INT,

Review Comment:
   Thanks for catching the deprecated API. I've moved the counters to 
ts::Metrics.



-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to