diff options
Diffstat (limited to 'kamon-spray/src/main')
3 files changed, 5 insertions, 5 deletions
diff --git a/kamon-spray/src/main/resources/reference.conf b/kamon-spray/src/main/resources/reference.conf index c5270ef5..1a900fea 100644 --- a/kamon-spray/src/main/resources/reference.conf +++ b/kamon-spray/src/main/resources/reference.conf @@ -19,7 +19,7 @@ kamon { # Fully qualified name of the implementation of kamon.spray.SprayNameGenerator that will be used for assigning names # to traces and client http segments. - name-generator = kamon.spray.DefaultSprayNameGenerator + name-generator = kamon.spray.DefaultNameGenerator client { # Strategy used for automatic trace segment generation when issue requests with spray-client. The possible values 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 |