Skip to content

Commit

Permalink
Merge pull request #61 from Ptrskay3/document-push-gateway
Browse files Browse the repository at this point in the history
Briefly document push gateway mode
  • Loading branch information
Ptrskay3 authored Jul 20, 2024
2 parents 0b83fb7 + 2143908 commit e6cb09c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ Let's note that since `metrics-exporter-prometheus = "0.13"` that crate [introdu
requires openssl support. The `axum_prometheus` crate __does not__ rely on, nor enable this feature by default — if you need it,
you may enable it through the `"push-gateway"` feature in `axum_prometheus`.

## Prometheus push gateway feature

This crate currently has no higher level API for the `push-gateway` feature. If you plan to use it, enable the `push-gateway` feature in `axum-prometheus`, use `BaseMetricLayer`, and setup your recorder manually, similar to the [`base-metric-layer-example`](./examples/base-metric-layer-example/src/main.rs).

## Using a different exporter than Prometheus

This crate may be used with other exporters than Prometheus. First, disable the default features:
Expand Down
5 changes: 5 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@
//! axum_http_requests_duration_seconds_count{method="GET",status="200",endpoint="/metrics"} 4
//! ```
//!
//! ## Prometheus push gateway feature
//! This crate currently has no higher level API for the `push-gateway` feature. If you plan to use it, enable the
//! `push-gateway` feature in `axum-prometheus`, use `BaseMetricLayer`, and setup your recorder manually, similar to
//! the `base-metric-layer-example`.
//!
//! ## Using a different exporter than Prometheus
//!
//! This crate may be used with other exporters than Prometheus. First, disable the default features:
Expand Down

0 comments on commit e6cb09c

Please sign in to comment.