diff options
author | Ivan Topolnak <ivantopo@gmail.com> | 2013-10-10 18:52:09 -0300 |
---|---|---|
committer | Ivan Topolnak <ivantopo@gmail.com> | 2013-10-10 18:52:09 -0300 |
commit | 6a66fa57ed27d1873b4b152fc482832b78d67db5 (patch) | |
tree | ffd3af4b5e1d9acac96f41c33e16f9c21172f997 /kamon-core/src/main/scala/test/SimpleRequestProcessor.scala | |
parent | 81cff1bfa93a2cb4465aceff7fe1ab2d21fbcd0c (diff) | |
download | Kamon-6a66fa57ed27d1873b4b152fc482832b78d67db5.tar.gz Kamon-6a66fa57ed27d1873b4b152fc482832b78d67db5.tar.bz2 Kamon-6a66fa57ed27d1873b4b152fc482832b78d67db5.zip |
complete spray client instrumentation with experimental branch
Diffstat (limited to 'kamon-core/src/main/scala/test/SimpleRequestProcessor.scala')
-rw-r--r-- | kamon-core/src/main/scala/test/SimpleRequestProcessor.scala | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/kamon-core/src/main/scala/test/SimpleRequestProcessor.scala b/kamon-core/src/main/scala/test/SimpleRequestProcessor.scala index 7d4cec52..ef657f24 100644 --- a/kamon-core/src/main/scala/test/SimpleRequestProcessor.scala +++ b/kamon-core/src/main/scala/test/SimpleRequestProcessor.scala @@ -24,8 +24,12 @@ object SimpleRequestProcessor extends App with SimpleRoutingApp with RequestBuil startServer(interface = "localhost", port = 9090) { get { path("test"){ - complete { - pipeline(Get("http://www.despegar.com.ar")).map(r => "Ok") + uow { + complete { + val futures = pipeline(Get("http://10.254.10.57:8000/")).map(r => "Ok") :: pipeline(Get("http://10.254.10.57:8000/")).map(r => "Ok") :: Nil + + Future.sequence(futures).map(l => "Ok") + } } } ~ path("reply" / Segment) { reqID => @@ -45,6 +49,12 @@ object SimpleRequestProcessor extends App with SimpleRoutingApp with RequestBuil dynamic { complete(Future { "OK" }) } + } ~ + path("error") { + complete { + throw new NullPointerException + "okk" + } } } } |