diff --git a/.github/workflows/scala.yml b/.github/workflows/scala.yml index bd63367..16cff8e 100644 --- a/.github/workflows/scala.yml +++ b/.github/workflows/scala.yml @@ -8,18 +8,13 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 - - name: Set up Scala - uses: olafurpg/setup-scala@v11 + uses: actions/checkout@v4 + - name: Set up Java + uses: actions/setup-java@v4 with: - java-version: openjdk@1.14 - - name: Cache sbt - uses: actions/cache@v2 - with: - path: | - ~/.ivy2/cache - ~/.sbt - key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt') }} + distribution: temurin + java-version: 17.0.8 + cache: sbt - name: Check format run: sbt scalafmtCheckAll - name: Run tests diff --git a/README.md b/README.md index 77b7649..dd239ad 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,11 @@ Collection of utilities to allow exposing prometheus metrics from pekko-http endpoint using the prometheus java client - "com.varwise" %% "prometheus-pekko-http" % "0.6.0" + "com.varwise" %% "prometheus-pekko-http" % "1.0.0" + +### Related projects + +[prometheus-akka-http](https://github.com/varwise/prometheus-akka-http) - same thing but for akka-http ### Publishing diff --git a/build.sbt b/build.sbt index ff9aa9e..dd55ad0 100644 --- a/build.sbt +++ b/build.sbt @@ -25,11 +25,11 @@ libraryDependencies ++= { ("org.apache.pekko" %% "pekko-stream" % pekkoVersion % Provided).cross(CrossVersion.for3Use2_13), ("org.apache.pekko" %% "pekko-http" % pekkoHttpVersion % Provided).cross(CrossVersion.for3Use2_13), ("org.apache.pekko" %% "pekko-http-spray-json" % pekkoHttpVersion % Provided).cross(CrossVersion.for3Use2_13), - "io.prometheus" % "simpleclient" % simpleclientVersion, - "io.prometheus" % "simpleclient_common" % simpleclientVersion, - ("org.apache.pekko" %% "pekko-testkit" % pekkoVersion % Test).cross(CrossVersion.for3Use2_13), - ("org.apache.pekko" %% "pekko-http-testkit" % pekkoHttpVersion % Test).cross(CrossVersion.for3Use2_13), - "org.scalatest" %% "scalatest" % scalaTestVersion % Test + "io.prometheus" % "simpleclient" % simpleclientVersion, + "io.prometheus" % "simpleclient_common" % simpleclientVersion, + ("org.apache.pekko" %% "pekko-testkit" % pekkoVersion % Test).cross(CrossVersion.for3Use2_13), + ("org.apache.pekko" %% "pekko-http-testkit" % pekkoHttpVersion % Test).cross(CrossVersion.for3Use2_13), + "org.scalatest" %% "scalatest" % scalaTestVersion % Test ) } diff --git a/src/test/scala/com/varwise/pekko/http/prometheus/PrometheusResponseTimeRecorderSpec.scala b/src/test/scala/com/varwise/pekko/http/prometheus/PrometheusResponseTimeRecorderSpec.scala index c92b25a..d6046ec 100644 --- a/src/test/scala/com/varwise/pekko/http/prometheus/PrometheusResponseTimeRecorderSpec.scala +++ b/src/test/scala/com/varwise/pekko/http/prometheus/PrometheusResponseTimeRecorderSpec.scala @@ -17,7 +17,7 @@ class PrometheusResponseTimeRecorderSpec extends AnyFlatSpec with Matchers { labelNames: List[String], labelValues: List[String], bucket: Double - ): Int = { + ): Int = { val name = metricName + "_bucket" // 'le' should be the first label in the list