Skip to content

Commit

Permalink
Merge pull request #79 from gpgekko/2.7
Browse files Browse the repository at this point in the history
Play 2.7
  • Loading branch information
Avihay Tsayeg authored Feb 14, 2019
2 parents f24567c + ec2c556 commit dcf70d8
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: scala
scala:
- 2.12.3
- 2.11.11
- 2.12.8
- 2.11.12
jdk:
- oraclejdk8
script:
Expand Down
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# metrics-play

This module provides some support for @codahale [Metrics](https://dropwizard.github.io/metrics/3.1.0/) library in a Play2 application (Scala)
This module provides some support for @codahale [Metrics](https://dropwizard.github.io/metrics/4.0.5/) library in a Play2 application (Scala)

[![Build Status](https://travis-ci.org/kenshoo/metrics-play.png)](https://travis-ci.org/kenshoo/metrics-play)

[![codecov.io](https://img.shields.io/codecov/c/gh/kenshoo/metrics-play/master.svg)](https://codecov.io/github/kenshoo/metrics-play/branch/master)

Play Version: 2.6.19, Metrics Version: 4.0.3, Scala Versions: 2.12.6
Play Version: 2.7.0, Metrics Version: 4.0.5, Scala Versions: 2.12.8

## Features

Expand All @@ -22,7 +22,7 @@ Add metrics-play dependency:
```scala
val appDependencies = Seq(
...
"com.kenshoo" %% "metrics-play" % "2.6.19_0.7.0"
"com.kenshoo" %% "metrics-play" % "2.7.0_0.8.0"
)
```

Expand All @@ -34,7 +34,7 @@ add to application.conf the following line

### Default Registry

To add a custom metrics, you can use `defaultRegistry` which returns an instance of [MetricRegistry](http://metrics.dropwizard.io/3.1.0/manual/core/).
To add a custom metrics, you can use `defaultRegistry` which returns an instance of [MetricRegistry](https://metrics.dropwizard.io/4.0.5/manual/core).

```scala
import com.kenshoo.play.metrics.Metrics
Expand All @@ -48,25 +48,25 @@ To add a custom metrics, you can use `defaultRegistry` which returns an instance

### Metrics Controller

An implementation of the [metrics-servlet](http://metrics.dropwizard.io/3.1.0/manual/servlets/#metricsservlet) as a play2 controller.
An implementation of the [metrics-servlet](https://metrics.dropwizard.io/4.0.5/manual/servlets#metricsservlet) as a play2 controller.

It exports all registered metrics as a json document.

To enable the controller add a mapping to conf/routes file

GET /admin/metrics com.kenshoo.play.metrics.MetricsController.metrics

#### Configuration
Some configuration is supported through the default configuration file:

metrics.rateUnit - (default is SECONDS)
metrics.rateUnit - (default is SECONDS)

metrics.durationUnit (default is SECONDS)

metrics.showSamples [true/false] (default is false)

metrics.jvm - [true/false] (default is true) controls reporting jvm metrics

metrics.logback - [true/false] (default is true) controls reporing logback metrics

### Metrics Filter
Expand Down Expand Up @@ -139,8 +139,9 @@ instead of `com.kenshoo.play.metrics.PlayModule`

## Changes

* 2.7.0_0.8.0 - Upgrade to play 2.7.0 and Scala 2.12.8 and dropwizard 4.0.5
* 2.6.19_0.7.0 - Upgrade to play 2.6.19 and Scala 2.12.6 and dropwizard 4.0.3
* 2.6.2_0.6.1 - Upgrade to play 2.6 and Scala 2.12. Migration: If you get errors like "No configuration setting found ..." when building fat JARs, check your merge strategy for reference.conf.
* 2.6.2_0.6.1 - Upgrade to play 2.6 and Scala 2.12. Migration: If you get errors like "No configuration setting found ..." when building fat JARs, check your merge strategy for reference.conf.
* 2.4.0_0.4.0 - Re-implement as Play Module
* 2.4.0_0.3.0 - Upgrade to play 2.4, metrics 3.1.2
* 2.3.0_0.2.1 - Breaking Change! prefix jvm metric names to standardize with dropwizard
Expand Down
12 changes: 6 additions & 6 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ organization:= "com.kenshoo"

name := "metrics-play"

scalaVersion := "2.12.6"
scalaVersion := "2.12.8"

crossScalaVersions := Seq(scalaVersion.value, "2.11.11")
crossScalaVersions := Seq(scalaVersion.value, "2.11.12")

val playVersion = "2.6.19"
val playVersion = "2.7.0"

val metricsPlayVersion = "0.7.0"
val metricsPlayVersion = "0.8.0"

val dropwizardVersion = "4.0.3"
val dropwizardVersion = "4.0.5"

version := s"${playVersion}_${metricsPlayVersion}"

Expand All @@ -35,7 +35,7 @@ libraryDependencies ++= Seq(
"io.dropwizard.metrics" % "metrics-jvm" % dropwizardVersion,
"io.dropwizard.metrics" % "metrics-logback" % dropwizardVersion,
"com.typesafe.play" %% "play" % playVersion % Provided,
"org.joda" % "joda-convert" % "2.1.1",
"org.joda" % "joda-convert" % "2.2.0",

//Test
"com.typesafe.play" %% "play-test" % playVersion % Test,
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.1.6
sbt.version=1.2.8
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/release

addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.1")

addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.1")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.2-1")

0 comments on commit dcf70d8

Please sign in to comment.