metrics-scala 0,0,0,0 travis-ci

The scala API for Dropwizard's Metrics.

Metrics-Scala

Capturing JVM- and application-level metrics. So you know what’s going on.

This is the Scala API for Dropwizard’s Metrics library.

Initially this project started out as a line for line copy of the Metrics-scala module, released for multiple scala versions. Metrics dropped the scala module in version 3.0.0 and this project continued separately with the help of @scullxbones.

We strive for long term stability, correctness, an easy to use API and full documentation (in that order).

Contents

Usage

Metrics-scala provides an easy way to create metrics and health checks in Scala. Since version 3.5.5 creating metrics and health checks is as easy as extending DefaultInstrumented and using the metrics and healthCheck builders:

class Example(db: Database) extends nl.grons.metrics.scala.DefaultInstrumented {
  // Define a health check
  healthCheck("alive") { workerThreadIsActive() }

  // Define a timer metric
  private[this] val loading = metrics.timer("loading")

  // Use timer metric
  def loadStuff(): Seq[Row] = loading.time {
    db.fetchRows()
  }
}

For more detailed information see the manual. For more information on Metrics-core 3.x, please see the documentation.

See also the change log for improvements and API changes.

Features

  • Easy creation of all metrics types.
  • Easy creation of Health Checks.
  • Almost invisible syntax for using timers (see example above).
  • Scala specific methods on metrics (e.g. += on counters).
  • Derives proper metrics names for Scala objects and closures.
  • Actor support.
  • Future support.
  • Hdrhistogram support.

Available versions (abbreviated)

This table shows the most relevant versions of metrics-scala. For the full list see all available versions.

Metrics-
scala
version
Metrics-
core
version
Akka
version
Scala version Hdr
version (*)
2.10 2.11 2.12.0-RC1(**)
2.1.5 2.1.5
3.5.5 3.1.2 1.1.0/2.1.9
3.5.5_a2.2 3.1.2 2.2.5 1.1.0/2.1.9
3.5.5_a2.3 3.1.2 2.3.15 / 2.4.x 1.1.0/2.1.9
3.5.5_a2.4 3.1.2 2.4.11 1.1.0/2.1.9

If you need another version mix please open an issue, or sent an email to the metrics mailing list.

Note: If Akka has a newer minor-version, you can use that instead of the version metrics-scala was build against. (If you use Akka 2.4, you can use the build for Akka 2.3 as Akka 2.4 is binary compatible with Akka 2.3.)

(*) Hdr is an optional dependency. The first number is the version of "org.mpierce.metrics.reservoir" % "hdrhistogram-metrics-reservoir", the second the version of "org.hdrhistogram" % "HdrHistogram". See also hdrhistogram manual page.

(**) The 2.12.0-RC1 version is only supported until Scala 2.12 is out for real.

Download

SBT:

libraryDependencies += "nl.grons" %% "metrics-scala" % "3.5.5_a2.3"

Maven:

<properties>
    <scala.version>2.11.0</scala.version>
    <scala.dep.version>2.11</scala.dep.version>
</properties>
<dependency>
    <groupId>nl.grons</groupId>
    <artifactId>metrics-scala_${scala.dep.version}</artifactId>
    <version>3.5.5_a2.3</version>
</dependency>

To use hdrhistogram additional dependencies are needed. See the hdrhistogram manual page.

Support

If you find a bug, please open an issue, better yet: send a pull request. For questions, please sent an email to the metrics mailing list.

License

Copyright © 2010-2012 Coda Hale, Yammer.com (before 3.0.0)

Copyright © 2013-2016 Erik van Oosten (3.0.0 and later)

Published under Apache Software License 2.0, see LICENSE

Related Repositories

stringmetric

stringmetric

:dart: String metrics and phonetic algorithms for Scala (e.g. Dice/Sorensen, Hamming, Jaccard, Jaro, Jaro-Winkler, Levenshtein, Metaphone, N-Gram, NYSIIS, Overlap, Ratcliff/Obershelp, Refined NYSIIS, Refined Soundex, Soundex, Weighted Levenshtein). ...

metrics-scala

metrics-scala

The scala API for Dropwizard's Metrics. ...

metrics-scala

metrics-scala

clone of codahale's scala wrapper for his great metrics library ...

engineering-metrics-slack-jira-phab

engineering-metrics-slack-jira-phab

Simple play + guice scala app that integrates with Phabricator, Jira and Slack ...

stringmetric

stringmetric

:dart: String metrics and phonetic algorithms for Scala (e.g. Dice/Sorensen, Hamming, Jaccard, Jaro, Jaro-Winkler, Levenshtein, Metaphone, N-Gram, NYSIIS, Overlap, Ratcliff/Obershelp, Refined NYSIIS, Refined Soundex, Soundex, Weighted Levenshtein). ...


Top Contributors

codahale erikvanoosten ryantenney chids waywardmonkeys scullxbones cb372 dinomite jebl01 collinvandyck kevinclark samperman mjg123 nicktelford jmhodges neilprosser jasonberanek javasoze maciej takezoe Slakah avaitla flicken ccare gshakhn gseitz jaimeagudo jklukas oconnor0 stevenschlansker

Releases

-   version-3.5.5 zip tar
-   version-3.5.4 zip tar
-   version-3.5.3 zip tar
-   version-3.5.2 zip tar
-   version-3.5.1 zip tar
-   version-3.5.0 zip tar
-   version-3.3.0 zip tar
-   version-3.2.1 zip tar
-   version-3.2.0 zip tar
-   version-3.0.3 zip tar
-   version-3.0.2 zip tar
-   version-3.0.1 zip tar
-   version-3.0.0 zip tar
-   v3.0.0 zip tar
-   v3.0.0-RC1 zip tar
-   v3.0.0-BETA3 zip tar
-   v3.0.0-BETA2 zip tar
-   v3.0.0-BETA1 zip tar
-   v2.8.1-compatibility zip tar
-   v2.2.0 zip tar
-   v2.1.5 zip tar
-   v2.1.4 zip tar
-   v2.1.3 zip tar
-   v2.1.2 zip tar
-   v2.1.1 zip tar
-   v2.1.0 zip tar
-   v2.0.3 zip tar
-   v2.0.2 zip tar
-   v2.0.1 zip tar
-   v2.0.0 zip tar