accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject [1/2] accumulo git commit: ACCUMULO-3696 warn once a minute if spans are being dropped.
Date Thu, 26 Mar 2015 14:10:15 GMT
Repository: accumulo
Updated Branches:
  refs/heads/master 483aee470 -> b96e0a762


ACCUMULO-3696 warn once a minute if spans are being dropped.


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/5b8e9759
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/5b8e9759
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/5b8e9759

Branch: refs/heads/master
Commit: 5b8e975904197d08cce26fa416ef3bad063a8f52
Parents: f6ea7e6
Author: Eric Newton <eric.newton@gmail.com>
Authored: Thu Mar 26 09:59:11 2015 -0400
Committer: Eric Newton <eric.newton@gmail.com>
Committed: Thu Mar 26 09:59:11 2015 -0400

----------------------------------------------------------------------
 .../trace/instrument/receivers/AsyncSpanReceiver.java         | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/5b8e9759/trace/src/main/java/org/apache/accumulo/trace/instrument/receivers/AsyncSpanReceiver.java
----------------------------------------------------------------------
diff --git a/trace/src/main/java/org/apache/accumulo/trace/instrument/receivers/AsyncSpanReceiver.java
b/trace/src/main/java/org/apache/accumulo/trace/instrument/receivers/AsyncSpanReceiver.java
index 1226e03..5fe46c8 100644
--- a/trace/src/main/java/org/apache/accumulo/trace/instrument/receivers/AsyncSpanReceiver.java
+++ b/trace/src/main/java/org/apache/accumulo/trace/instrument/receivers/AsyncSpanReceiver.java
@@ -52,6 +52,7 @@ public abstract class AsyncSpanReceiver<SpanKey,Destination> implements
SpanRece
   Timer timer = new Timer("SpanSender", true);
   final AbstractQueue<RemoteSpan> sendQueue = new ConcurrentLinkedQueue<RemoteSpan>();
   final int maxQueueSize;
+  long lastNotificationOfDroppedSpans = 0;
 
   public AsyncSpanReceiver(String host, String service, long millis, int maxQueueSize) {
     this.host = host;
@@ -104,6 +105,12 @@ public abstract class AsyncSpanReceiver<SpanKey,Destination> implements
SpanRece
   public void span(long traceId, long spanId, long parentId, long start, long stop, String
description, Map<String,String> data) {
 
     if (sendQueue.size() > maxQueueSize) {
+      long now = System.currentTimeMillis();
+      if (now - lastNotificationOfDroppedSpans > 60 * 1000) {
+        log.warn("Tracing spans are being dropped because there are already " + maxQueueSize
+ " spans queued for delivery.\n" +
+            "This does not affect performance, security or data integrity, but distributed
tracing information is being lost.");
+        lastNotificationOfDroppedSpans = now;
+      }
       return;
     }
 


Mime
View raw message