Skip to content

Commit

Permalink
PROP-1376 - Upgrading Kamon to 1.0 (#14)
Browse files Browse the repository at this point in the history
* Upgrading kamon to 1.0

* Bumped libraries

* Bumped cats-effect
  • Loading branch information
ericaovo authored Apr 9, 2019
1 parent 86b225d commit e9ff316
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ val common = Seq(
"-language:higherKinds"
),
libraryDependencies ++= Seq(
compilerPlugin("org.spire-math" %% "kind-projector" % "0.9.7"),
"org.typelevel" %% "cats-effect" % "1.0.0",
"org.scalatest" %% "scalatest" % "3.0.5" % "test",
compilerPlugin("org.spire-math" %% "kind-projector" % "0.9.10"),
"org.typelevel" %% "cats-effect" % "1.2.0",
"org.scalatest" %% "scalatest" % "3.0.7" % "test",
"org.scalacheck" %% "scalacheck" % "1.14.0" % "test"
)
)
Expand All @@ -42,6 +42,6 @@ lazy val kamonMetrics = project
.settings(common :+ (name := "kamon-metrics"))
.settings(
libraryDependencies ++= Seq(
"io.kamon" %% "kamon-core" % "0.6.7"
"io.kamon" %% "kamon-core" % "1.1.0"
)
)
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ object Metrics {
*/
def syncKamonMetrics[F[_]: Sync]: Metrics[F] = new Metrics[F] {
def counter(metric: Metric): F[Long => F[Unit]] =
Sync[F].delay(Kamon.metrics.counter(metric.name, metric.tags)).map(
Sync[F].delay(Kamon.counter(metric.name).refine(metric.tags)).map(
counter => times => Sync[F].delay(counter.increment(times))
)

def histogram(metric: Metric): F[Long => F[Unit]] =
Sync[F].delay(Kamon.metrics.histogram(metric.name, metric.tags)).map(
Sync[F].delay(Kamon.histogram(metric.name).refine(metric.tags)).map(
histogram => duration => Sync[F].delay(histogram.record(duration))
)
}
Expand Down

0 comments on commit e9ff316

Please sign in to comment.