Prometheus.ex 

Elixir Prometheus.io client based on Prometheus.erl.
Example
defmodule ExampleInstrumenter do
use Prometheus.Metric
def setup do
Histogram.new([name: :http_request_duration_milliseconds,
labels: [:method],
buckets: [100, 300, 500, 750, 1000],
help: "Http Request execution time"])
end
def instrument(%{time: time, method: method}) do
Histogram.observe([name: :http_request_duration_milliseconds, labels: [method]], time)
end
endIntegrations / Collectors / Instrumenters
- Ecto collector
- Elixir plugs
- Elli middleware
- Fuse plugin
- Phoenix instrumenter
- Process Info Collector
- RabbitMQ Exporter
Installation
Available in Hex, the package can be installed as:
-
Add
prometheus_exto your list of dependencies inmix.exs:
```elixir
def deps do
[{:prometheus_ex, "~> 0.0.2"}]
end
```-
Ensure
prometheus_exis started before your application:
```elixir
def application do
[applications: [:prometheus_ex]]
end
```