[[prometheus]]
= Prometheus (`prometheus`)

The `prometheus` endpoint provides Spring Boot application's metrics in the format required for scraping by a Prometheus server.



[[prometheus.retrieving]]
== Retrieving All Metrics

To retrieve all metrics, make a `GET` request to `/actuator/prometheus`, as shown in the following curl-based example:

include::partial$rest/actuator/prometheus/all/curl-request.adoc[]

The resulting response is similar to the following:

include::partial$rest/actuator/prometheus/all/http-response.adoc[]

The default response content type is `text/plain;version=0.0.4`.
The endpoint can also produce `application/openmetrics-text;version=1.0.0` when called with an appropriate `Accept` header, as shown in the following curl-based example:

include::partial$rest/actuator/prometheus/openmetrics/curl-request.adoc[]

The resulting response is similar to the following:

include::partial$rest/actuator/prometheus/openmetrics/http-response.adoc[]



[[prometheus.retrieving.query-parameters]]
=== Query Parameters

The endpoint uses query parameters to limit the samples that it returns.
The following table shows the supported query parameters:

[cols="2,4"]
include::partial$rest/actuator/prometheus/names/query-parameters.adoc[]



[[prometheus.retrieving-names]]
== Retrieving Filtered Metrics

To retrieve metrics matching specific names, make a `GET` request to `/actuator/prometheus` with the `includedNames` query parameter, as shown in the following curl-based example:

include::partial$rest/actuator/prometheus/names/curl-request.adoc[]

The resulting response is similar to the following:

include::partial$rest/actuator/prometheus/names/http-response.adoc[]

