@Test public void incrementsCounterWhenUnexpected_binaryAnnotation() throws Exception { recorder.record( new Record(root, Time.fromMilliseconds(TODAY), new Annotation.BinaryAnnotation("web", new Date()), empty()) ); assertThat(mapAsJavaMap(stats.counters())).containsExactly( entry(seq("record", "unhandled", "java.util.Date"), 1L) ); }
void record(Record record) { MutableSpan span = spanMap.get(record.traceId()); if (span == null) { MutableSpan newSpan = new MutableSpan(record.traceId(), Time$.MODULE$.now()); MutableSpan prev = spanMap.putIfAbsent(record.traceId(), newSpan); span = prev != null ? prev : newSpan; } append(record, span); if (span.isComplete()) { spanMap.remove(record.traceId(), span); report(span); } }
SpanRecorder extends AbstractClosable { void record(Record record) { MutableSpan span = spanMap.get(record.traceId()); if (span == null) { MutableSpan newSpan = new MutableSpan(record.traceId(), Time$.MODULE$.now()); MutableSpan prev = spanMap.putIfAbsent(record.traceId(), newSpan); span = prev != null ? prev : newSpan; } append(record, span); if (span.isComplete()) { spanMap.remove(record.traceId(), span); report(span); } } }
SpanRecorder extends AbstractClosable { void record(Record record) { MutableSpan span = spanMap.get(record.traceId()); if (span == null) { MutableSpan newSpan = new MutableSpan(record.traceId(), Time$.MODULE$.now()); MutableSpan prev = spanMap.putIfAbsent(record.traceId(), newSpan); span = prev != null ? prev : newSpan; } append(record, span); if (span.isComplete()) { spanMap.remove(record.traceId(), span); report(span); } } SpanRecorder(Reporter<Span> reporter, StatsReceiver stats, Timer timer, String localServiceName); }
SpanRecorder extends AbstractClosable { void record(Record record) { MutableSpan span = spanMap.get(record.traceId()); if (span == null) { MutableSpan newSpan = new MutableSpan(record.traceId(), Time$.MODULE$.now()); MutableSpan prev = spanMap.putIfAbsent(record.traceId(), newSpan); span = prev != null ? prev : newSpan; } append(record, span); if (span.isComplete()) { spanMap.remove(record.traceId(), span); report(span); } } SpanRecorder(Reporter<Span> reporter, StatsReceiver stats, Timer timer, String localServiceName); @Override Future<BoxedUnit> close(Time deadline); }
SpanRecorder extends AbstractClosable { void record(Record record) { MutableSpan span = spanMap.get(record.traceId()); if (span == null) { MutableSpan newSpan = new MutableSpan(record.traceId(), Time$.MODULE$.now()); MutableSpan prev = spanMap.putIfAbsent(record.traceId(), newSpan); span = prev != null ? prev : newSpan; } append(record, span); if (span.isComplete()) { spanMap.remove(record.traceId(), span); report(span); } } SpanRecorder(Reporter<Span> reporter, StatsReceiver stats, Timer timer, String localServiceName); @Override Future<BoxedUnit> close(Time deadline);  }