프로젝트
GitHub에서 보기
prometheus-erl/prometheus.ex
소개
Prometheus.io Elixir 클라이언트
시스템 및 인프라측정된 스타 증가
- in 24h
- 0
- in 7 days
- -1
- in 15 days
- -1
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalPrometheus.ex
Elixir Prometheus.io client based on Prometheus.erl.
Dashboard from Monitoring Elixir apps in 2016: Prometheus and Grafana by @skosch.
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
end
or
defmodule ExampleInstrumenter do
use Prometheus.Metric
@histogram [name: :http_request_duration_milliseconds,
labels: [:method],
buckets: [100, 300, 500, 750, 1000],
help: "Http Request execution time"]
def instrument(%{time: time, method: method}) do
Histogram.observe([name: :http_request_duration_milliseconds, labels: [method]], time)
end
end
Here histogram will be declared in auto-generated @on_load callback, i.e.
you don't have to call setup manually.
Please read how to measure durations correctly with prometheus.ex.
Integrations / Collectors / Instrumenters
- Ecto collector
- Elli middleware
- Extatus - App to report metrics to Prometheus from Elixir GenServers
- Plugs Instrumenter/Exporter
- Fuse plugin
- OS process info Collector (Linux-only)
- Phoenix instrumenter
- RabbitMQ Exporter
Dashboards
Installation
Available in Hex, the package can be installed as:
Add
prometheus_exto your list of dependencies inmix.exs:def deps do [{:prometheus_ex, "~> 4.0"}] endEnsure
prometheus_exis started before your application:def application do [applications: [:prometheus_ex]] end
관련 프로젝트 살펴보기
불러오는 중…