Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Briefly document push gateway mode #61

Merged
merged 2 commits into from
Jul 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading