Source:
public void span(RemoteSpan s) throws TException { String idString = Long.toHexString(s.traceId); String startString = Long.toHexString(s.start); Mutation spanMutation = new Mutation(new Text(idString)); Mutation indexMutation = new Mutation(new Text("idx:" + s.svc + ":" + startString)); long diff = s.stop - s.start; indexMutation.put(new Text(s.description), new Text(s.sender), new Value((idString + ":" + Long.toHexString(diff)).getBytes(UTF_8))); ByteArrayTransport transport = new ByteArrayTransport(); TCompactProtocol protocol = new TCompactProtocol(transport); s.write(protocol); String parentString = Long.toHexString(s.parentId); if (s.parentId == Span.ROOT_SPAN_ID) parentString = ""; put(spanMutation, "span", parentString + ":" + Long.toHexString(s.spanId), transport.get(), transport.len()); Mutation timeMutation = null; if (s.parentId == Span.ROOT_SPAN_ID) { timeMutation = new Mutation(new Text("start:" + startString)); put(timeMutation, "id", idString, transport.get(), transport.len()); } try { final BatchWriter writer = TraceServer.this.writer.get(); if (null == writer) { log.warn("writer is not ready; discarding span."); return; } writer.addMutation(spanMutation); writer.addMutation(indexMutation); if (timeMutation != null) writer.addMutation(timeMutation); } catch (MutationsRejectedException exception) { log.warn("Unable to write mutation to table; discarding span. set log level to DEBUG for span information and stacktrace. cause: {}", exception, exception); if (log.isDebugEnabled()) { log.debug("discarded span due to rejection of mutation: {}", spanMutation, exception); } } catch (RuntimeException exception) { log.warn("Unable to write mutation to table; discarding span. set log level to DEBUG for stacktrace. cause: {}", exception, exception); log.debug("unable to write mutation to table due to exception.", exception); } }

Target:
public void span(RemoteSpan s) throws TException { String idString = Long.toHexString(s.traceId); String startString = Long.toHexString(s.start); Mutation spanMutation = new Mutation(new Text(idString)); Mutation indexMutation = new Mutation(new Text("idx:" + s.svc + ":" + startString)); long diff = s.stop - s.start; indexMutation.put(new Text(s.description), new Text(s.sender), new Value((idString + ":" + Long.toHexString(diff)).getBytes(UTF_8))); ByteArrayTransport transport = new ByteArrayTransport(); TCompactProtocol protocol = new TCompactProtocol(transport); s.write(protocol); String parentString = Long.toHexString(s.parentId); if (s.parentId == Span.ROOT_SPAN_ID) parentString = ""; put(spanMutation, "span", parentString + ":" + Long.toHexString(s.spanId), transport.get(), transport.len()); Mutation timeMutation = null; if (s.parentId == Span.ROOT_SPAN_ID) { timeMutation = new Mutation(new Text("start:" + startString)); put(timeMutation, "id", idString, transport.get(), transport.len()); } try { final BatchWriter writer = TraceServer.this.writer.get(); if (null == writer) { log.warn("writer is not ready; discarding span."); return; } writer.addMutation(spanMutation); writer.addMutation(indexMutation); if (timeMutation != null) writer.addMutation(timeMutation); } catch (MutationsRejectedException exception) { log.warn("Unable to write mutation to table; discarding span. set log level to DEBUG for span information and stacktrace. cause: " + exception); if (log.isDebugEnabled()) { log.debug("discarded span due to rejection of mutation: " + spanMutation, exception); } } catch (RuntimeException exception) { log.warn("Unable to write mutation to table; discarding span. set log level to DEBUG for stacktrace. cause: " + exception); log.debug("unable to write mutation to table due to exception.", exception); } }