diff options
author | Ivan Topolnjak <ivantopo@gmail.com> | 2015-05-04 23:01:55 +0200 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2015-05-04 23:01:55 +0200 |
commit | 6d4cc924e965fc013533826bdff73ba8335f749b (patch) | |
tree | d1e52699e67a63757d57e3cadc51c23b89338729 /kamon-play/src/main/scala | |
parent | 15a686559261470adeea26be5edef702a2a3729d (diff) | |
download | Kamon-6d4cc924e965fc013533826bdff73ba8335f749b.tar.gz Kamon-6d4cc924e965fc013533826bdff73ba8335f749b.tar.bz2 Kamon-6d4cc924e965fc013533826bdff73ba8335f749b.zip |
! play: change PlayNameGenerator to plain NameGenerator.
Diffstat (limited to 'kamon-play/src/main/scala')
-rw-r--r-- | kamon-play/src/main/scala/kamon/play/Play.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kamon-play/src/main/scala/kamon/play/Play.scala b/kamon-play/src/main/scala/kamon/play/Play.scala index 92f0dc74..072ea436 100644 --- a/kamon-play/src/main/scala/kamon/play/Play.scala +++ b/kamon-play/src/main/scala/kamon/play/Play.scala @@ -42,18 +42,18 @@ class PlayExtension(private val system: ExtendedActorSystem) extends Kamon.Exten val traceTokenHeaderName: String = config.getString("trace-token-header-name") private val nameGeneratorFQN = config.getString("name-generator") - private val nameGenerator: PlayNameGenerator = system.dynamicAccess.createInstanceFor[PlayNameGenerator](nameGeneratorFQN, Nil).get + private val nameGenerator: NameGenerator = system.dynamicAccess.createInstanceFor[NameGenerator](nameGeneratorFQN, Nil).get def generateTraceName(requestHeader: RequestHeader): String = nameGenerator.generateTraceName(requestHeader) def generateHttpClientSegmentName(request: WSRequest): String = nameGenerator.generateHttpClientSegmentName(request) } -trait PlayNameGenerator { +trait NameGenerator { def generateTraceName(requestHeader: RequestHeader): String def generateHttpClientSegmentName(request: WSRequest): String } -class DefaultPlayNameGenerator extends PlayNameGenerator { +class DefaultNameGenerator extends NameGenerator { def generateTraceName(requestHeader: RequestHeader): String = s"${requestHeader.method}: ${requestHeader.uri}" def generateHttpClientSegmentName(request: WSRequest): String = request.url } |