Copilot commented on code in PR #13287:
URL: https://github.com/apache/trafficserver/pull/13287#discussion_r3424604207
##########
plugins/compress/compress.cc:
##########
@@ -349,6 +349,17 @@ compress_transform_init(TSCont contp, Data *data)
TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
}
+static int compress_stat_bytes_in = TS_ERROR;
+
+static void
+init_compress_stats()
+{
+ if (TS_ERROR == compress_stat_bytes_in) {
+ compress_stat_bytes_in =
+ TSStatCreate("proxy.process.plugin.compress.bytes_in",
TS_RECORDDATATYPE_INT, TS_STAT_NON_PERSISTENT, TS_STAT_SYNC_COUNT);
+ }
Review Comment:
`bytes_in` is a byte-total metric, so its stat metadata should use SUM
semantics (and the byte-counter datatype) to match other plugin byte metrics
(e.g., `generator.response_bytes`, `statichit.response_bytes`). Using COUNT
here is semantically incorrect for a byte total and can lead to confusing
downstream reporting if sync types are honored.
--
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]