@Test public void emitAnnotation_OnDoubleOverload_ShouldEmitAnnotation() { double value = 327D; ByteBuffer wrappedValue = ByteBuffer.allocate(Double.SIZE / 8).putDouble(value); wrappedValue.flip(); BinaryAnnotation binaryAnnotation = new BinaryAnnotation(key, wrappedValue, AnnotationType.DOUBLE); binaryAnnotation.setHost(endpoint); List<Annotation> annotations = Collections.emptyList(); Span expectedSpan = new Span(traceId, spanName, spanId, annotations, Lists.newArrayList(binaryAnnotation)); expectedSpan.setParent_id(0); victim.emitAnnotation(zipkinData, key, value); verify(zipkinSpanCollector).collect(expectedSpan); }
public void emitAnnotation(@Nonnull ZipkinData zipkinData, @Nonnull String s) { long timestampMillis = clock.millis(); long timestampMicros = TimeUnit.MILLISECONDS.toMicros(timestampMillis); ZipkinAnnotationsStore store = prepareEmission(zipkinData, s).addAnnotation(timestampMicros, s); emitAnnotations(store); }
ZipkinEmitter implements InitializingBean { public void emitAnnotation(@Nonnull ZipkinData zipkinData, @Nonnull String s) { long timestampMillis = clock.millis(); long timestampMicros = TimeUnit.MILLISECONDS.toMicros(timestampMillis); ZipkinAnnotationsStore store = prepareEmission(zipkinData, s).addAnnotation(timestampMicros, s); emitAnnotations(store); } }
ZipkinEmitter implements InitializingBean { public void emitAnnotation(@Nonnull ZipkinData zipkinData, @Nonnull String s) { long timestampMillis = clock.millis(); long timestampMicros = TimeUnit.MILLISECONDS.toMicros(timestampMillis); ZipkinAnnotationsStore store = prepareEmission(zipkinData, s).addAnnotation(timestampMicros, s); emitAnnotations(store); } ZipkinEmitter(@Nonnull String serviceName, @Nonnull ZipkinSpanCollector zipkinSpanCollector,
                         @Nonnull Clock clock);  ZipkinEmitter(@Nonnull String serviceName, @Nonnull ZipkinSpanCollector zipkinSpanCollector,
                         @Nonnull Clock clock, int serviceIPv4); }
ZipkinEmitter implements InitializingBean { public void emitAnnotation(@Nonnull ZipkinData zipkinData, @Nonnull String s) { long timestampMillis = clock.millis(); long timestampMicros = TimeUnit.MILLISECONDS.toMicros(timestampMillis); ZipkinAnnotationsStore store = prepareEmission(zipkinData, s).addAnnotation(timestampMicros, s); emitAnnotations(store); } ZipkinEmitter(@Nonnull String serviceName, @Nonnull ZipkinSpanCollector zipkinSpanCollector,
                         @Nonnull Clock clock);  ZipkinEmitter(@Nonnull String serviceName, @Nonnull ZipkinSpanCollector zipkinSpanCollector,
                         @Nonnull Clock clock, int serviceIPv4); void emitServerReceive(@Nonnull ZipkinData zipkinData); void emitServerSend(@Nonnull ZipkinData zipkinData); void emitClientSend(@Nonnull ZipkinData zipkinData); void emitClientReceive(@Nonnull ZipkinData zipkinData); @Nonnull ZipkinAnnotationsStore buildAnnotationsStore(@Nonnull ZipkinData zipkinData); void emitAnnotations(@Nonnull ZipkinAnnotationsStore zipkinAnnotationsStore); void emitAnnotation(@Nonnull ZipkinData zipkinData, @Nonnull String s); void emitAnnotation(@Nonnull ZipkinData zipkinData, @Nonnull String key, @Nonnull String value); void emitAnnotation(@Nonnull ZipkinData zipkinData, @Nonnull String key, short value); void emitAnnotation(@Nonnull ZipkinData zipkinData, @Nonnull String key, int value); void emitAnnotation(@Nonnull ZipkinData zipkinData, @Nonnull String key, long value); void emitAnnotation(@Nonnull ZipkinData zipkinData, @Nonnull String key, double value); void emitAnnotation(@Nonnull ZipkinData zipkinData, @Nonnull String key, boolean value); void emitAnnotation(@Nonnull ZipkinData zipkinData, @Nonnull String key, byte[] value); @Override void afterPropertiesSet(); @ManagedAttribute int getCurrentQueueSize(); @ManagedAttribute int getRemainingQueueCapacity(); }
ZipkinEmitter implements InitializingBean { public void emitAnnotation(@Nonnull ZipkinData zipkinData, @Nonnull String s) { long timestampMillis = clock.millis(); long timestampMicros = TimeUnit.MILLISECONDS.toMicros(timestampMillis); ZipkinAnnotationsStore store = prepareEmission(zipkinData, s).addAnnotation(timestampMicros, s); emitAnnotations(store); } ZipkinEmitter(@Nonnull String serviceName, @Nonnull ZipkinSpanCollector zipkinSpanCollector,
                         @Nonnull Clock clock);  ZipkinEmitter(@Nonnull String serviceName, @Nonnull ZipkinSpanCollector zipkinSpanCollector,
                         @Nonnull Clock clock, int serviceIPv4); void emitServerReceive(@Nonnull ZipkinData zipkinData); void emitServerSend(@Nonnull ZipkinData zipkinData); void emitClientSend(@Nonnull ZipkinData zipkinData); void emitClientReceive(@Nonnull ZipkinData zipkinData); @Nonnull ZipkinAnnotationsStore buildAnnotationsStore(@Nonnull ZipkinData zipkinData); void emitAnnotations(@Nonnull ZipkinAnnotationsStore zipkinAnnotationsStore); void emitAnnotation(@Nonnull ZipkinData zipkinData, @Nonnull String s); void emitAnnotation(@Nonnull ZipkinData zipkinData, @Nonnull String key, @Nonnull String value); void emitAnnotation(@Nonnull ZipkinData zipkinData, @Nonnull String key, short value); void emitAnnotation(@Nonnull ZipkinData zipkinData, @Nonnull String key, int value); void emitAnnotation(@Nonnull ZipkinData zipkinData, @Nonnull String key, long value); void emitAnnotation(@Nonnull ZipkinData zipkinData, @Nonnull String key, double value); void emitAnnotation(@Nonnull ZipkinData zipkinData, @Nonnull String key, boolean value); void emitAnnotation(@Nonnull ZipkinData zipkinData, @Nonnull String key, byte[] value); @Override void afterPropertiesSet(); @ManagedAttribute int getCurrentQueueSize(); @ManagedAttribute int getRemainingQueueCapacity();  }