Skip to content

Commit

Permalink
= spm: fix sending metrics failure message
Browse files Browse the repository at this point in the history
  • Loading branch information
jozic committed Nov 5, 2015
1 parent 8e286ba commit 5609a5c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions kamon-spm/src/main/scala/kamon/spm/SPM.scala
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ class SPMExtension(system: ExtendedActorSystem) extends Kamon.Extension {

val config = system.settings.config.getConfig("kamon.spm")
val maxQueueSize = config.getInt("max-queue-size")
val retryInterval: FiniteDuration = config.getDuration("retry-interval", TimeUnit.MILLISECONDS) millis
val sendTimeout: FiniteDuration = config.getDuration("send-timeout", TimeUnit.MILLISECONDS) millis
val retryInterval: FiniteDuration = config.getFiniteDuration("retry-interval")
val sendTimeout: FiniteDuration = config.getFiniteDuration("send-timeout")
val url = config.getString("receiver-url")
val token = config.getString("token")
val hostname = if (config.hasPath("hostname-alias")) {
Expand Down
4 changes: 2 additions & 2 deletions kamon-spm/src/main/scala/kamon/spm/SPMMetricsSender.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import akka.util.Timeout
import spray.http.Uri.Query
import spray.http.{ HttpEntity, HttpResponse, Uri }
import spray.httpx.RequestBuilding._
import spray.json.{ DefaultJsonProtocol, _ }
import spray.json._

import scala.annotation.tailrec
import scala.collection.immutable.{ Map, Queue }
Expand Down Expand Up @@ -103,7 +103,7 @@ class SPMMetricsSender(io: ActorRef, retryInterval: FiniteDuration, sendTimeout:
post(metrics)
}
case resp: HttpResponse if resp.status.isFailure {
log.warning("Metrics can't be sent. Response status: ${resp.status}. Scheduling retry.")
log.warning(s"Metrics can't be sent. Response status: ${resp.status}. Scheduling retry.")
context.system.scheduler.scheduleOnce(retryInterval, self, Retry)
}
case ScheduleRetry {
Expand Down

0 comments on commit 5609a5c

Please sign in to comment.