Aias00 opened a new issue, #7687:
URL: https://github.com/apache/shenyu/issues/7687

   ### Problem
   
   The shared access-log collector deliberately bounds admission, but operators 
cannot observe records discarded at this boundary:
   
   - In multi-client mode, `bufferQueue.offer(log)` ignores a `false` return.
   - In single-client mode, a full queue simply skips `queue.offer(log)`.
   
   Neither branch records a drop counter or queue-occupancy metric in the 
collector.
   
   ### Location
   
   
[AbstractLogCollector.collect()](https://github.com/apache/shenyu/blob/66d7d954ca37d651a5ad916f988a8081157a7ab4/shenyu-plugin/shenyu-plugin-logging/shenyu-plugin-logging-common/src/main/java/org/apache/shenyu/plugin/logging/common/collector/AbstractLogCollector.java#L109),
 lines 113–123.
   
   ### Impact and priority
   
   **P2 / Medium enhancement.** During traffic bursts or slow log sinks, access 
logs can be incomplete without an explicit signal at the shared admission 
boundary. Operators need to distinguish a healthy empty log stream from a 
saturated collector, and size `bufferQueueSize` using evidence.
   
   ### Proposed enhancement
   
   Expose accepted/dropped record counters and queue occupancy/capacity through 
the existing metrics infrastructure. Keep metric label cardinality bounded, and 
retain the existing nonblocking request-path admission behavior. A rate-limited 
diagnostic can complement metrics; avoid one warning per dropped record.
   
   ### Acceptance criteria
   
   - Full-queue rejections are counted in both single-client and multi-client 
paths.
   - Queue occupancy and configured capacity can be inspected without 
enumerating request paths or request IDs as labels.
   - Metrics distinguish admission drops from backend send failures; 
names/documentation describe the distinction.
   - Disabled collectors and normal rule sampling are not falsely reported as 
queue-overflow losses.
   - Instrumentation does not introduce blocking or an unbounded auxiliary 
queue on the gateway request path.
   
   ### Related existing work
   
   Searched all 3,074 issue titles and targeted live logging/drop/metrics 
searches. #6794 concerns downstream cloud-send executor rejection and thread 
lifetime; #6763 concerns shutdown flushing; #5930 concerns body 
materialization. This proposal adds observability to the shared collector's 
bounded **ingress** admission, rather than changing those implementations or 
making logs lossless.
   
   ### Evidence and environment
   
   Source-confirmed missing instrumentation in `collect()` on Apache ShenYu 
`2.7.2-SNAPSHOT`, `master@66d7d954ca37d651a5ad916f988a8081157a7ab4`. This is an 
operability proposal; no throughput benchmark or runtime log-loss rate is 
claimed. Unit-test and CI issue categories excluded.
   


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