Skip to content

Commit

Permalink
Update Kamon to 2.1.0, http4s to 0.21.3
Browse files Browse the repository at this point in the history
  • Loading branch information
hygt committed Apr 9, 2020
1 parent cf5b33b commit 3969d74
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 32 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
language: scala
script:
- sbt test
- sbt +test
scala:
- 2.12.10
- 2.12.11
- 2.13.1
jdk:
- oraclejdk8
- openjdk8
before_script:
- mkdir $TRAVIS_BUILD_DIR/tmp
- export SBT_OPTS="-Djava.io.tmpdir=$TRAVIS_BUILD_DIR/tmp"
Expand Down
35 changes: 14 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,24 @@

The `kamon-http4s` module brings traces and metrics to your [http4s][4] based applications.

Kamon <b>kamon-http4s</b> is currently available for Scala 2.11 and 2.12.
Kamon <b>kamon-http4s</b> is currently available for Scala 2.12 and 2.13.

Supported releases and dependencies are shown below.

| kamon-http4s | status | jdk | scala | http4s
|:------:|:------:|:----:|--------------:|-------
| 1.0.8-1.0.10 | stable | 1.8+ | 2.11, 2.12 | 0.18.x
| 1.0.13 | stable | 1.8+ | 2.11, 2.12 | 0.20.x
| 2.0.0 | stable | 1.8+ | 2.11, 2.12 | 0.20.x
| 2.0.1 | stable | 1.8+ | 2.12, 2.13 | 0.21.x
| 1.0.8-1.0.10 | stable | 8+ | 2.11, 2.12 | 0.18.x
| 1.0.13 | stable | 8+ | 2.11, 2.12 | 0.20.x
| 2.0.0 | stable | 8+ | 2.11, 2.12 | 0.20.x
| 2.0.1 | stable | 8+ | 2.12, 2.13 | 0.21.x
| 2.1.0 | stable | 8+ | 2.12, 2.13 | 0.21.x


To get started with SBT, simply add the following to your `build.sbt`
file:

```scala
libraryDependencies += "io.kamon" %% "kamon-http4s" % "2.0.0"
libraryDependencies += "io.kamon" %% "kamon-http4s" % "2.1.0"
```

## Metrics and Tracing for http4s in 2 steps
Expand Down Expand Up @@ -66,26 +67,18 @@ object GoogleService {
### Step 1: Add the Kamon Libraries
```scala
libraryDependencies ++= Seq(
"io.kamon" %% "kamon-core" % "1.1.2",
"io.kamon" %% "kamon-system-metrics" % "1.0.1",
"io.kamon" %% "kamon-prometheus" % "1.0.0",
"io.kamon" %% "kamon-http4s" % "1.0.7",
"io.kamon" %% "kamon-zipkin" % "1.0.1",
"io.kamon" %% "kamon-jaeger" % "1.0.2"
"io.kamon" %% "kamon-core" % "2.1.0",
"io.kamon" %% "kamon-system-metrics" % "2.1.0",
"io.kamon" %% "kamon-prometheus" % "2.1.0",
"io.kamon" %% "kamon-http4s" % "2.1.0",
"io.kamon" %% "kamon-zipkin" % "2.1.0",
"io.kamon" %% "kamon-jaeger" % "2.1.0"
)
```

### Step 2: Start Reporting your Data

The last step in the process: start reporting your data! You can register as many reporters as you want by using the
`Kamon.addReporter(...)` function:

```scala
Kamon.addReporter(new PrometheusReporter())
Kamon.addReporter(new ZipkinReporter())
Kamon.addReporter(new Jaeger())
```

Since version 2.0, Kamon reporters are started automatically through their default configuration.
Now you can simply `sbt run` the application and after a few seconds you will get the Prometheus metrics
exposed on <http://localhost:9095/> and message traces sent to Zipkin! The default configuration publishes the Prometheus
endpoint on port 9095 and assumes that you have a Zipkin instance running locally on port 9411 but you can change these
Expand Down
15 changes: 8 additions & 7 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,21 @@
* =========================================================================================
*/

val kamonCore = "io.kamon" %% "kamon-core" % "2.0.4"
val kamonTestkit = "io.kamon" %% "kamon-testkit" % "2.0.4"
val kamonCommon = "io.kamon" %% "kamon-instrumentation-common" % "2.0.1"
val kamonCore = "io.kamon" %% "kamon-core" % "2.1.0"
val kamonTestkit = "io.kamon" %% "kamon-testkit" % "2.1.0"
val kamonCommon = "io.kamon" %% "kamon-instrumentation-common" % "2.1.0"

val server = "org.http4s" %% "http4s-blaze-server" % "0.21.0"
val client = "org.http4s" %% "http4s-blaze-client" % "0.21.0"
val dsl = "org.http4s" %% "http4s-dsl" % "0.21.0"
val server = "org.http4s" %% "http4s-blaze-server" % "0.21.3"
val client = "org.http4s" %% "http4s-blaze-client" % "0.21.3"
val dsl = "org.http4s" %% "http4s-dsl" % "0.21.3"


lazy val root = (project in file("."))
.settings(Seq(
name := "kamon-http4s",
scalaVersion := "2.13.1",
crossScalaVersions := Seq("2.12.10", "2.13.1")))
crossScalaVersions := Seq("2.12.11", "2.13.1")),
fork := true)
.settings(resolvers += Resolver.bintrayRepo("kamon-io", "snapshots"))
.settings(resolvers += Resolver.mavenLocal)
.settings(scalacOptions ++= (CrossVersion.partialVersion(scalaVersion.value) match {
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.3.2
sbt.version=1.3.9

0 comments on commit 3969d74

Please sign in to comment.