Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/margostino/amplifix
Java toolkit (with Demo Service) built on top of Micrometer to provides a declarative and simpler way to build and expose metrics from any Java service.
https://github.com/margostino/amplifix
grafana hazelcast metrics micrometer spring spring-boot vertx
Last synced: 23 days ago
JSON representation
Java toolkit (with Demo Service) built on top of Micrometer to provides a declarative and simpler way to build and expose metrics from any Java service.
- Host: GitHub
- URL: https://github.com/margostino/amplifix
- Owner: margostino
- License: apache-2.0
- Created: 2019-12-11T16:55:43.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-03-23T14:37:47.000Z (almost 3 years ago)
- Last Synced: 2024-11-10T09:13:59.387Z (3 months ago)
- Topics: grafana, hazelcast, metrics, micrometer, spring, spring-boot, vertx
- Language: Java
- Homepage: https://margostino.com
- Size: 53.4 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Table of Contents
* [About the Project](#about-the-project)
* [Built With](#built-with)
* [Getting Started](#getting-started)
* [Prerequisites](#prerequisites)
* [Installation](#installation)
* [Usage](#usage)
* [Roadmap](#roadmap)
* [Contributing](#contributing)
* [License](#license)## About The Project
![architecture](./documentation/images/architecture.png#center)
Amplifix is Java toolkit built on top of [Micrometer](https://micrometer.io/) to provide a declarative and simpler way to build and expose metrics from any Java service (not necessarily RESTful API). This toolkit is framework agnostic. You can use it together with Spring, Dropwizard, Vertx, or many others.
The main motivation is to isolate the metric handling from any service which only should care of business logic.
The build and posting happen asyncronous using a [Vertx Event Bus](https://vertx.io/docs/vertx-core/java/).The idea behind is to enable the developer a simple way to declare and publish metrics to the choice monitoring service (Datadog, Grafana, etc.). The toolkit follows the [OpenMetric](https://github.com/OpenObservability/OpenMetrics) standard for transmitting metrics at scale.
The developer needs to concentrate energy in business logic. Metrics handling should be automated extracting values from events and processing them in a standard format in asyncronous fashion. The only thing the developer should do is (in every desired place):
```
eventBus.send(event)
```Under the wood the toolkit needs to underderstand the source, the type of metric and the values required.
**IMPORTANT:** This project is an experiment and it is in continuous progress, adding, changing features and evaluating performance and new functionalities. Once this toolkit is stable, and with a bounded scope, the first version will be properly released and documented. So it should not be used in Production environments.
### Built With
The toolkit is built on top of [Micrometer](https://micrometer.io/) and uses [Vertx](https://vertx.io) to enable the event bus along the service.
Also it uses [Hazelcast](https://hazelcast.com) to allow building complex metric such as conversion rate given an event (more info is coming...).## Getting Started
This repo includes 3 projects:
* [Amplifix Toolkit](https://github.com/margostino/amplifix/tree/master/toolkit)
* [Demo Spring RESTful API](https://github.com/margostino/amplifix/tree/master/demo-spring)
* [Demo Vertx RESTful API](https://github.com/margostino/amplifix/tree/master/demo-vertx)The [Makefile ](https://github.com/margostino/amplifix/blob/master/Makefile) includes all commands available to build the toolkit, the demo, integrate both and run in a docker enviroment with all the dependendencies by default to test the functionalities.
#### Showcase dependencies:
* Prometheus: as default monitoring tool.
* Grafana: as default metrics visualization service.
* Nginx: as default load balancer to distribute requests to the Demo which runs in a (small) cluster of 2 instances.
* Hazelcast (management-center): in-memory data grid to monitor and manage your cluster members running Hazelcast IMDG by the toolkit.#### (1) If you want to run all in one:
##### Run Spring Demo:
```
make start-spring
```##### Run Vertx Demo:
```
make start-vertx
```#### (2) If you want to build and run separately:
##### Build Toolkit:
```
make build-toolkit
```##### Build Spring Demo:
```
make build-spring
```##### Build Vertx Demo:
```
make build-vertx
```##### Run Demo (either Spring or Vertx):
```
make run
```### Prerequisites
The tookit runs with Java 8 and the Showcase enviroments also need Docker in place.
## Usage
Once the showcase dependencies are up running:
![docker-showcase](./documentation/images/docker-showcase.png#center)
Run the flow generator command to perform N request against the Demo:
```
make generate-flow max=10 port=5000
```The port parameter is where the Demo Service is listening.
Visualize the metrics in OpenMetric format:
```
http://localhost:5000/metrics
```![openmetrics](./documentation/images/openmetrics.png#center)
Visualize the default dashboard with metrics in Grafana:
```
http://localhost:3000
```![grafana](./documentation/images/grafana.png#center)
Manage the Hazelcast IMDG cluster:
```
http://localhost:8080/hazelcast-mancenter/dev
```![hazelcast-mancenter](./documentation/images/hazelcast-mancenter.png#center)
## Roadmap
[coming soon...]
## Contributing
[coming soon...]
## License
Distributed under Apache License. See [LICENSE](https://github.com/margostino/amplifix/blob/master/LICENSE) for more information.