https://github.com/fizzed/prometheus-plus
Utilities and framework integrations for Java and Prometheus
https://github.com/fizzed/prometheus-plus
Last synced: 2 months ago
JSON representation
Utilities and framework integrations for Java and Prometheus
- Host: GitHub
- URL: https://github.com/fizzed/prometheus-plus
- Owner: fizzed
- Created: 2020-12-12T20:17:43.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-12-30T05:15:37.000Z (over 4 years ago)
- Last Synced: 2024-03-27T08:17:15.945Z (about 1 year ago)
- Language: Java
- Homepage:
- Size: 3.13 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
Ninja Framework + Prometheus by Fizzed
============================================[](https://maven-badges.herokuapp.com/maven-central/com.fizzed/prometheus-plus)
[Fizzed, Inc.](http://fizzed.com) (Follow on Twitter: [@fizzed_inc](http://twitter.com/fizzed_inc))
## Overview
Integration of [Prometheus](https://prometheus.io) with the
[Ninja Framework](https://github.com/ninjaframework/ninja).## Setup
Add the prometheus-ninja-module dependency to your Maven pom.xml
```xml
com.fizzed
prometheus-ninja-module
0.0.5```
In your `conf/Module.java` file:
```java
package conf;import com.fizzed.prometheus.ninja.NinjaPrometheusModule;
import com.google.inject.AbstractModule;public class Module extends AbstractModule {
@Override
protected void configure() {
install(new NinjaPrometheusModule());
}}
```In your `conf/Routes.java` file:
```java
package conf;import com.fizzed.prometheus.ninja.NinjaPrometheusRoutes;
import ninja.Results;
import ninja.Router;
import ninja.application.ApplicationRoutes;public class Routes implements ApplicationRoutes {
@Override
public void init(Router router) {
NinjaPrometheusRoutes.init(router);}
}
```## Demo
There is a Ninja app in the `demo` folder that demonstrates all the functionality
this module provides and it's a simple way to see how it works. This project
uses [Blaze](https://github.com/fizzed/blaze) to help script tasks. Run the
following in your shell (from the root project directory, not in `demo`):java -jar blaze.jar demo
Once running, point your browser to http://localhost:8080/
## License
Copyright (C) 2020 Fizzed, Inc.
This work is licensed under the Apache License, Version 2.0. See LICENSE for details.