play-metrics-module

route metrics for Playframework.

License

License

Categories

Categories

Metrics Application Testing & Monitoring Monitoring
GroupId

GroupId

si.poponline
ArtifactId

ArtifactId

play-metrics-module_2.11
Last Version

Last Version

1.1
Release Date

Release Date

Type

Type

jar
Description

Description

play-metrics-module
route metrics for Playframework.
Project URL

Project URL

https://github.com/samek/play-metrics-module
Project Organization

Project Organization

poponline.si
Source Code Management

Source Code Management

https://github.com/samek/play-metrics-module

Download play-metrics-module_2.11

How to add to project

<!-- https://jarcasting.com/artifacts/si.poponline/play-metrics-module_2.11/ -->
<dependency>
    <groupId>si.poponline</groupId>
    <artifactId>play-metrics-module_2.11</artifactId>
    <version>1.1</version>
</dependency>
// https://jarcasting.com/artifacts/si.poponline/play-metrics-module_2.11/
implementation 'si.poponline:play-metrics-module_2.11:1.1'
// https://jarcasting.com/artifacts/si.poponline/play-metrics-module_2.11/
implementation ("si.poponline:play-metrics-module_2.11:1.1")
'si.poponline:play-metrics-module_2.11:jar:1.1'
<dependency org="si.poponline" name="play-metrics-module_2.11" rev="1.1">
  <artifact name="play-metrics-module_2.11" type="jar" />
</dependency>
@Grapes(
@Grab(group='si.poponline', module='play-metrics-module_2.11', version='1.1')
)
libraryDependencies += "si.poponline" % "play-metrics-module_2.11" % "1.1"
[si.poponline/play-metrics-module_2.11 "1.1"]

Dependencies

compile (9)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.11.7
com.typesafe.play : twirl-api_2.11 jar 1.1.1
com.typesafe.play : play-server_2.11 jar 2.5.10
com.typesafe.play : play-java_2.11 jar 2.5.10
com.typesafe.play : play-netty-server_2.11 jar 2.5.10
com.typesafe.play : play-logback_2.11 jar 2.5.10
com.typesafe.play : play-java-jdbc_2.11 jar 2.5.10
com.typesafe.play : play-cache_2.11 jar 2.5.10
com.typesafe.play : play-java-ws_2.11 jar 2.5.10

test (1)

Group / Artifact Type Version
com.typesafe.play : play-test_2.11 jar 2.5.10

Project Modules

There are no modules declared in this project.

#Play Framework 2.5.10 module for monitoring route metrics.

##Usage

In your play framework project add this line to build.sbt

"si.poponline" % "play-metrics-module_2.11" % "1.1"

to application config add:

play.poponline.graphite.host="YOUR_GRAPHITE_HOST"
play.poponline.app_name="PROJECT_NAME"
play.poponline.graphiteDump="30"
play.poponline.cleanUpAfter="60"

Make sure you have default UDP port open on GRAPHITE_HOST

In order to use the metrics add annotation above controller/method

eg.

package controllers;

import models.joke;
import play.libs.Json;
import play.mvc.Controller;
import play.mvc.Result;
import si.poponline.play.module.Monitoring.monitoring;


/**
 * Created by simke on 23/05/16.
 */
@monitoring
public class jokeController extends Controller {
    
....
....

If you want to grab json stats from the server you can do so by adding folowing linke to the route file

GET     /_admin/stats                si.poponline.play.module.Controllers.adminController.getStats()

Versions

Version
1.1
1.0