Skip to content

Commit

Permalink
report about invalid global settings
Browse files Browse the repository at this point in the history
  • Loading branch information
levkhomich committed Dec 23, 2014
1 parent 89f7658 commit 6ca3e99
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,14 @@ trait PlayActorTracing extends ActorTracing { self: Actor =>
class PlayRequestTracingSupport(val headers: RequestHeader) extends AnyVal with BaseTracingSupport {

override private[tracing] def $spanId: Long =
headers.tags.get(TracingHeaders.SpanId).map(java.lang.Long.parseLong(_)).get
headers.tags.get(TracingHeaders.SpanId).map(java.lang.Long.parseLong(_)) match {
case Some(spanId) =>
spanId
case _ =>
throw new IllegalStateException(
"Traced request was not properly tagged. Probably, TracingSettings was not mixed into global Play config."
)
}

override private[tracing] def sample(): Unit = {}

Expand Down

0 comments on commit 6ca3e99

Please sign in to comment.