/** * The Scribe client which is used for rpc writes a list of * LogEntry objects, so the span objects are first transformed into LogEntry objects before * sending to the zipkin-collector. * * Here is a little ascii art which shows the above transformation: * <pre> * +------------+ +------------+ +------------+ +-----------------+ * | HTrace Span|-->|Zipkin Span |-->| (LogEntry) | ===========> | Zipkin Collector| * +------------+ +------------+ +------------+ (Scribe RPC) +-----------------+ * </pre> * @param spans to be sent. The raw bytes are being sent. * @throws IOException if there is a problem sending the span entries */ @Override public void send(List<byte[]> spans) throws IOException { ArrayList<LogEntry> entries = new ArrayList<LogEntry>(spans.size()); for (byte[] span : spans) { entries.add(new LogEntry(CATEGORY, Base64.encodeBase64String(span))); } try { if (LOG.isTraceEnabled()) { LOG.trace("sending " + entries.size() + " entries"); } scribe.Log(entries); // TODO (clehene) should we instead interpret the return? } catch (TException e) { throw new IOException(e); } }
/** * The Scribe client which is used for rpc writes a list of * LogEntry objects, so the span objects are first transformed into LogEntry objects before * sending to the zipkin-collector. * * Here is a little ascii art which shows the above transformation: * <pre> * +------------+ +------------+ +------------+ +-----------------+ * | HTrace Span|-->|Zipkin Span |-->| (LogEntry) | ===========> | Zipkin Collector| * +------------+ +------------+ +------------+ (Scribe RPC) +-----------------+ * </pre> * @param spans to be sent. The raw bytes are being sent. * @throws IOException if there is a problem sending the span entries */ @Override public void send(List<byte[]> spans) throws IOException { ArrayList<LogEntry> entries = new ArrayList<LogEntry>(spans.size()); for (byte[] span : spans) { entries.add(new LogEntry(CATEGORY, Base64.encodeBase64String(span))); } try { if (LOG.isTraceEnabled()) { LOG.trace("sending " + entries.size() + " entries"); } scribe.Log(entries); // TODO (clehene) should we instead interpret the return? } catch (TException e) { throw new IOException(e); } }
public Log_result getResult(I iface, Log_args args) throws org.apache.thrift.TException { Log_result result = new Log_result(); result.success = iface.Log(args.messages); return result; } }
public Log_result getResult(I iface, Log_args args) throws org.apache.thrift.TException { Log_result result = new Log_result(); result.success = iface.Log(args.messages); return result; } }
public Log_result getResult(I iface, Log_args args) throws org.apache.thrift.TException { Log_result result = new Log_result(); result.success = iface.Log(args.messages); return result; } }