wu-sheng commented on code in PR #13481:
URL: https://github.com/apache/skywalking/pull/13481#discussion_r2329201994


##########
oap-server/server-receiver-plugin/zipkin-receiver-plugin/src/main/java/org/apache/skywalking/oap/server/receiver/zipkin/trace/SpanForward.java:
##########
@@ -198,10 +203,23 @@ private List<Span> getSampledTraces(List<Span> input) {
                 sampledTraces.add(span);
                 continue;
             }
-            long traceId = HexCodec.lowerHexToUnsignedLong(span.traceId());
-            traceId = traceId == Long.MIN_VALUE ? Long.MAX_VALUE : 
Math.abs(traceId);
-            if (traceId <= samplerBoundary) {
+            
+            // Apply maximum spans per minute sampling first
+            if (rateLimiter != null && !rateLimiter.tryAcquire()) {
+                log.debug("Span dropped due to maximum spans per minute limit: 
{}", span.id());

Review Comment:
   Please add a so11y metric here to indicate the counts of received spans and 
ignored spans



-- 
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: notifications-unsubscr...@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to