From 2ce7618f5982737e8cc36e1852ee88cd9bcfb164 Mon Sep 17 00:00:00 2001 From: Franklin Hu Date: Mon, 23 Jul 2012 11:35:46 -0700 Subject: [PATCH] Sort annotations when dumping to json --- .../src/main/scala/com/twitter/zipkin/adapter/JsonAdapter.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zipkin-finatra/src/main/scala/com/twitter/zipkin/adapter/JsonAdapter.scala b/zipkin-finatra/src/main/scala/com/twitter/zipkin/adapter/JsonAdapter.scala index b542cc97c3e..54af3435ea2 100644 --- a/zipkin-finatra/src/main/scala/com/twitter/zipkin/adapter/JsonAdapter.scala +++ b/zipkin-finatra/src/main/scala/com/twitter/zipkin/adapter/JsonAdapter.scala @@ -58,7 +58,7 @@ object JsonAdapter extends Adapter { s.serviceNames, s.firstAnnotation.get.timestamp, s.duration.get, - s.annotations, + s.annotations.sortWith((a,b) => a.timestamp < b.timestamp), s.binaryAnnotations.map(JsonAdapter(_))) }