Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
Added documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
stijndehaes committed Jul 2, 2017
1 parent 5966314 commit eac3420
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
25 changes: 19 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,42 @@

[![Build Status](https://travis-ci.org/stijndehaes/play-prometheus-filters.svg?branch=master)](https://travis-ci.org/stijndehaes/play-prometheus-filters)
[![Coverage Status](https://coveralls.io/repos/github/stijndehaes/play-prometheus-filters/badge.svg?branch=master)](https://coveralls.io/github/stijndehaes/play-prometheus-filters?branch=master)
This play library provides three types of filters that collect prometheus metrics.
This play library provides four types of filters that collect prometheus metrics.

Two of these filters are also compatible with the [lagom framework](https://github.com/lagom/lagom).

A simple hello world application using these filters can be found in the following repo:
https://github.com/stijndehaes/play-prometheus-filters-example-app

To use the library add the following to you build.sbt

```scala
libraryDependencies += "com.github.stijndehaes" %% "play-prometheus-filters" % "0.1.0"
libraryDependencies += "com.github.stijndehaes" %% "play-prometheus-filters" % "0.2.0"

```

## The filters

### Request counter
This filter counts all the requests in your application and adds a label for the status
This filter counts all the requests in your application and adds a label for the status.
This filter is compatible with the lagom framework.

### Latency filter
This filter collects the latency of all requests
This filter collects the latency of all requests.
This filter is compatible with the lagom framework.

### Route Action Method Latency Filter
This filter collects the latency for all requests and adds a label call RouteActionMethod.
### Route Latency Filter
This filter collects the latency for all requests and adds a label called RouteActionMethod.
This action method is the method name of the method you provided your routes file.
This filter makes it possible to measure the latency for all your routes.
This filter is not compatible with the lagom framework, since it does not provide the RouteActionMethod.

### Status and Route Latency Filter
This filter collects the latency for all requests, adds a label called RouteActionMethod and a label called status.
This action method is the method name of the method you provided your routes file.
This filter makes it possible to measure the latency for all your routes and the status of the response for this route.
It thus combines all the above filters into one.
This filter is not compatible with the lagom framework, since it does not provide the RouteActionMethod.

Example:

Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name := "play-prometheus-filters"
organization := "com.github.stijndehaes"

version := "0.2.0-SNAPSHOT"
version := "0.2.0"

lazy val root = (project in file("."))
.enablePlugins(PlayScala)
Expand Down

0 comments on commit eac3420

Please sign in to comment.