Skip to content
This repository was archived by the owner on Nov 15, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion akka-statsd-core/src/main/scala/Config.scala
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ object Config {
FiniteDuration(cfg.getDuration("transmit-interval", java.util.concurrent.TimeUnit.MILLISECONDS), MILLISECONDS),
enableMultiMetric = cfg.getBoolean("enable-multi-metric"),
emptyQueueOnFlush = cfg.getBoolean("empty-queue-on-flush"),
transformations = cfg.getConfigList("transformations").asScala.map(transformation),
transformations = cfg.getConfigList("transformations").asScala.toSeq.map(transformation),
transformUuid = cfg.getBoolean("transform-uuid"),
connectedUdp = cfg.getBoolean("connected-udp")
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ private[statsd] class MultiMetricQueue(val packetSize: Int)(implicit system: Act
def flushQueue(): Stream[String] = Stream.continually(payload()).takeWhile(_.nonEmpty).flatten

private object DroppedMessageWarning extends ((Int, String) => Unit) {
def apply(proposedAddition: Int, message: String) {
def apply(proposedAddition: Int, message: String): Unit = {
if (!logger.isWarningEnabled)
return

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ private[statsd] class ScheduledDispatcher(
else mmq.payload().foreach(connection ! _)
}

override def postStop() {
override def postStop(): Unit = {
val _ = recurringTransmit.cancel()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ private[statsd] class UdpUnconnected(remoteAddress: InetSocketAddress) extends A
def receive: Receive = waitingForConnection

def waitingForConnection: Receive = {
case Udp.SimpleSenderReady
case Udp.SimpleSenderReady =>
unstashAll()
context become operational(sender())
case _: String =>
Expand Down
2 changes: 1 addition & 1 deletion akka-statsd-core/src/test/scala/StatsSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class StatsSpec
.copy(address = boundListenerAddress())
val statsProps = Stats.props(baseConfig)

def shutdown() {
def shutdown(): Unit = {
listener ! Udp.Unbind
}
}
Expand Down
2 changes: 1 addition & 1 deletion akka-statsd-core/src/test/scala/TestKit.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ trait BeforeAndAfterAllTestKit

implicit def system: ActorSystem

override protected def afterAll() {
override protected def afterAll(): Unit = {
akka.testkit.TestKit.shutdownActorSystem(system)
}

Expand Down
4 changes: 2 additions & 2 deletions akka-statsd-http-server/src/main/scala/StatsDirectives.scala
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ trait StatsDirectives extends AroundDirectives with BasicDirectives {

def countRequestInBucket(baseBucket: String): Directive0 = {
extractStats.flatMap { stats =>
Directive { innerRouteBuilder ctx
Directive { innerRouteBuilder => ctx =>
val req = ctx.request
stats ! Increment(requestBucket(req.method, req.uri.path, baseBucket))
innerRouteBuilder(())(ctx)
Expand All @@ -94,7 +94,7 @@ trait StatsDirectives extends AroundDirectives with BasicDirectives {

def countResponseInBucket(baseBucket: String): Directive0 = {
extractStats.flatMap { stats =>
Directive { innerRouteBuilder ctx
Directive { innerRouteBuilder => ctx =>
import ctx.executionContext

val req = ctx.request
Expand Down
9 changes: 5 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import com.typesafe.sbt.pgp.PgpKeys
import ReleaseTransformations._
import tnm.ScalaVersion

val commonSettings = Seq(
organization := "com.newmotion",
licenses := Seq("MIT" -> url("http://opensource.org/licenses/MIT")),
homepage := Some(url("https://github.com/NewMotion/akka-statsd")),
crossScalaVersions := Seq(ScalaVersion.curr, ScalaVersion.prev, ScalaVersion.aged),
libraryDependencies ++= Seq(
akka("testkit"),
"org.scalatest" %% "scalatest" % "3.0.5"
"org.scalatest" %% "scalatest" % "3.0.8"
).map(_ % "test"),
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
releaseProcess := Seq[ReleaseStep](
Expand Down Expand Up @@ -76,8 +77,8 @@ val `akka-statsd` =

def akka(lib: String) = {
val version = lib match {
case x if x.startsWith("http") => "10.1.5"
case _ => "2.5.18"
case x if x.startsWith("http") => "10.1.10"
case _ => "2.5.25"
}

"com.typesafe.akka" %% s"akka-$lib" % version
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.2.6
sbt.version=1.3.2
6 changes: 3 additions & 3 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resolvers += "TNM" at "http://nexus.thenewmotion.com/content/groups/public"
resolvers += "TNM" at "https://nexus.thenewmotion.com/content/groups/public"

addSbtPlugin("com.newmotion" % "sbt-build-seed" % "4.1.2")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.1")
addSbtPlugin("com.newmotion" % "sbt-build-seed" % "5.0.4")
Copy link
Copy Markdown

@kiequoo kiequoo Oct 3, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you aware that 5.0.4 only cross-builds Scala 2.12 and 2.13 by default? I think in this case as this library only uses akka and akka still supports 2.11 we can probably cross build to all 3 versions still

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was aware of the former but not giving much of a thought to 2.11 support. I'll try to add it back.

addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.0")