diff options
Diffstat (limited to 'kamon-spray/src/main/scala')
-rw-r--r-- | kamon-spray/src/main/scala/kamon/spray/SprayExtension.scala | 4 | ||||
-rw-r--r-- | kamon-spray/src/main/scala/kamon/spray/SprayExtensionSettings.scala | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/kamon-spray/src/main/scala/kamon/spray/SprayExtension.scala b/kamon-spray/src/main/scala/kamon/spray/SprayExtension.scala index 37e12702..ebf79496 100644 --- a/kamon-spray/src/main/scala/kamon/spray/SprayExtension.scala +++ b/kamon-spray/src/main/scala/kamon/spray/SprayExtension.scala @@ -60,13 +60,13 @@ class SprayExtensionImpl(system: ExtendedActorSystem) extends SprayExtension { settings.nameGenerator.generateHostLevelApiSegmentName(request) } -trait SprayNameGenerator { +trait NameGenerator { def generateTraceName(request: HttpRequest): String def generateRequestLevelApiSegmentName(request: HttpRequest): String def generateHostLevelApiSegmentName(request: HttpRequest): String } -class DefaultSprayNameGenerator extends SprayNameGenerator { +class DefaultNameGenerator extends NameGenerator { def generateRequestLevelApiSegmentName(request: HttpRequest): String = { val uriAddress = request.uri.authority.host.address diff --git a/kamon-spray/src/main/scala/kamon/spray/SprayExtensionSettings.scala b/kamon-spray/src/main/scala/kamon/spray/SprayExtensionSettings.scala index 44c71eaf..627d5176 100644 --- a/kamon-spray/src/main/scala/kamon/spray/SprayExtensionSettings.scala +++ b/kamon-spray/src/main/scala/kamon/spray/SprayExtensionSettings.scala @@ -5,7 +5,7 @@ import akka.actor.ExtendedActorSystem case class SprayExtensionSettings( includeTraceTokenHeader: Boolean, traceTokenHeaderName: String, - nameGenerator: SprayNameGenerator, + nameGenerator: NameGenerator, clientInstrumentationLevel: ClientInstrumentationLevel.Level) object SprayExtensionSettings { @@ -16,7 +16,7 @@ object SprayExtensionSettings { val traceTokenHeaderName: String = config.getString("trace-token-header-name") val nameGeneratorFQN = config.getString("name-generator") - val nameGenerator: SprayNameGenerator = system.dynamicAccess.createInstanceFor[SprayNameGenerator](nameGeneratorFQN, Nil).get // let's bubble up any problems. + val nameGenerator: NameGenerator = system.dynamicAccess.createInstanceFor[NameGenerator](nameGeneratorFQN, Nil).get // let's bubble up any problems. val clientInstrumentationLevel: ClientInstrumentationLevel.Level = config.getString("client.instrumentation-level") match { case "request-level" ⇒ ClientInstrumentationLevel.RequestLevelAPI |