Skip to content

Commit

Permalink
Stop trying so hard
Browse files Browse the repository at this point in the history
  • Loading branch information
lloydmeta committed Feb 27, 2015
1 parent cfb90b0 commit b03d69c
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class ZipkinHeaderFilter(zipkinServiceFactory: => ZipkinServiceLike, reqHeaderTo

def apply(nextFilter: (RequestHeader) => Future[Result])(req: RequestHeader): Future[Result] = {
val parentSpan = zipkinService.generateSpan(reqHeaderToSpanName(req), req2span(req))
val fMaybeServerSpan = zipkinService.serverReceived(parentSpan)
val fMaybeServerSpan = zipkinService.serverReceived(parentSpan).recover { case NonFatal(e) => None }
fMaybeServerSpan flatMap {
case None => nextFilter(req)
case Some(serverSpan) => {
Expand All @@ -42,8 +42,6 @@ class ZipkinHeaderFilter(zipkinServiceFactory: => ZipkinServiceLike, reqHeaderTo
}
fResult
}
} recoverWith {
case NonFatal(e) => nextFilter(req)
}
}

Expand Down

0 comments on commit b03d69c

Please sign in to comment.